Time Functions

From Danmakufu Wiki
Jump to: navigation, search

GetCurrentDateTimeS

Returns a string containing the current date and time. For example, if the current date is 2012/09/16 12:34:56, then "20120916123456" will be returned. If you wanted to convert it to a number, you may use the atoi function; for example,

let year = atoi(GetCurrentDateTimeS[0..4]);

GetStageTime

Returns a number with the amount of time that has been elapsed since the start of the main script. The value is in milliseconds.

GetPackageTime

Returns a number with the amount of time that has been elapsed since the start of the package script. The value is in milliseconds.

GetCurrentFps

Returns the current FPS.

GetReplayFps

Returns the FPS of the replay at the current time. Note that this value refreshes as a much slower rate than GetCurrentFps.