newspeoplefor developersdocumentationdownloads

nTimeServer Script Interface

ntimeserver:

Super Class:

C++ Class:

Info

The ntimeserver object lives under the name /sys/servers/time and provides a central time source for Nebula.

Commands:


resettime

Command Input:
v
Command Output:
v
Command Description:
Reset global time to 0.0.

stoptime

Command Input:
v
Command Output:
v
Command Description:
Freeze global time.

starttime

Command Input:
v
Command Output:
v
Command Description:
Unfreeze global time.

gettime

Command Input:
v
Command Output:
f (Time)
Command Description:
Return current global time in seconds since the time server was created.

settime

Command Input:
f (Time)
Command Output:
v
Command Description:
Set global time in seconds.

lockdeltat

Command Input:
f (DeltaT)
Command Output:
v
Command Description:
If DeltaT is greater then 0.0, the frame time will be advanced in steps of size DeltaT. A value of 0.0 switches back to the proper timing behavior. Useful to lock virtual frame rate to a fixed value.

waitdeltat

Command Input:
f (DeltaT)
Command Output:
v
Command Description:
If DeltaT is greater then 0.0, then the time server will actually sleep this amount of time in each frame. This is useful for simulating a slow machine.

getlockdeltat

Command Input:
v
Command Output:
f (DeltaT)
Command Description:
Return the value set by 'lockdeltat'.

getwaitdeltat

Command Input:
v
Command Output:
f (DeltaT)
Command Description:
Return the value set by 'waitdeltat'.

enableframetime

Command Input:
v
Command Output:
v
Command Description:
Enable the 'frame time' mode of the 'getframetime' command. In this mode 'getframetime' will return exactly the same value each time it is called within a frame. Otherwise 'getframetime' returns the same value 'gettime' would.

disableframetime

Command Input:
v
Command Output:
v
Command Description:
Turn off frame time mode of 'getframetime'. Further calls to 'getframetime' will return exactly the same value as 'gettime'.

getframetime

Command Input:
v
Command Output:
v
Command Description:
Get the current frame time stamp. This value differs from the value returned by 'gettime' because 'gettime' will return a different value each time it is called, while 'getframetime' returns the same timestamp within one frame.

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.