thread.setDefaultTimeSlice

Syntax thread.setDefaultTimeSlice (timeSlice)

Params timeSlice is a number of ticks (sixtieths of a second).

Action Sets the default time slice for Frontier threads.

Returns True.

Examples thread.setDefaultTimeSlice (2)

   » true

Notes The time slice is the number of ticks after which the current thread will swap itself out and yield control of the processor to another thread that's ready to run.

However, there are times when a thread won't yield, if it's in a section of code where yielding would be dangerous.

The default time slice for one-shot threads is six. The default for the agents thread is four.

This verb was new in Frontier 6.2.

See Also thread.getTimeSlice

thread.setTimeSlice

thread.getDefaultTimeSlice

thread.getStats

Discuss