|
| void | ntime_update (double dt) |
| | Updatse the time based on realtime.
|
| ntime_t | ntime_create (int scu, int stp, int stu) |
| | Creates a time structure.
|
| ntime_t | ntime_get (void) |
| | Gets the current time.
|
| void | ntime_getR (int *cycles, int *periods, int *seconds, double *rem) |
| | Gets the current time broken into individual components.
|
| int | ntime_getCycles (ntime_t t) |
| | Gets the cycles of a time.
|
| int | ntime_getPeriods (ntime_t t) |
| | Gets the periods of a time.
|
| int | ntime_getSeconds (ntime_t t) |
| | Gets the seconds of a time.
|
| double | ntime_convertSeconds (ntime_t t) |
| | Converts the time to seconds.
|
| double | ntime_getRemainder (ntime_t t) |
| | Gets the remainder.
|
| char * | ntime_pretty (ntime_t t, int d) |
| | Gets the time in a pretty human readable format.
|
| void | ntime_prettyBuf (char *str, int max, ntime_t t, int d) |
| | Gets the time in a pretty human readable format filling a preset buffer.
|
| void | ntime_set (ntime_t t) |
| | Sets the time absolutely, does NOT generate an event, used at init.
|
| void | ntime_setR (int cycles, int periods, int seconds, double rem) |
| | Loads time including remainder.
|
| void | ntime_inc (ntime_t t) |
| | Sets the time relatively.
|
| void | ntime_allowUpdate (int enable) |
| | Allows the time to update when the game is updating.
|
| void | ntime_incLagged (ntime_t t) |
| | Sets the time relatively.
|
| void | ntime_refresh (void) |
| | Checks to see if ntime has any hooks pending to run.
|
Handles the Naev time.
1 cycle = 5e3 periods = 50e6 seconds 1 period = 10e3 seconds
Generally displayed as: UST <cycles>:<periods>.<seconds> The number of seconds digits can be variable, for example:
UST 630:3726.1 UST 630:3726.12 UST 630:3726.124 UST 630:3726.1248 UST 630:3726.12489
Are all valid.
Definitions / abbreviations:
- UST: Universal Synchronized Time, the name of the time system.
- seconds: Smallest named time unit. Equal to the Earth second.
- periods: Most commonly used time unit. Periods are the new hours. 1 period = 10,000 seconds (about 2.8 Earth hours).
- cycles: Used for long-term time periods. 1 cycle = 5000 periods (about 579 Earth days).
Definition in file ntime.c.