mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
messing with headers
This commit is contained in:
@@ -8,7 +8,7 @@ The standard library can usually be accessed with the `import` keyword:
|
||||
import standard;
|
||||
```
|
||||
|
||||
## fn clock(): string
|
||||
## clock()
|
||||
|
||||
This function returns the current timestamp.
|
||||
|
||||
|
||||
@@ -10,37 +10,37 @@ The timer library can usually be accessed with the `import` keyword:
|
||||
import timer;
|
||||
```
|
||||
|
||||
## fn startTimer(): opaque
|
||||
## startTimer()
|
||||
|
||||
This function returns an `opaque` timer object, representing the point in time when the function was called.
|
||||
|
||||
## fn _stopTimer(self: opaque): opaque
|
||||
## _stopTimer(self: opaque)
|
||||
|
||||
This function returns an `opaque` timer object, representing the duration between when the `self` argument was created, and when this function was called.
|
||||
|
||||
## fn createTimer(seconds: int, microseconds: int): opaque
|
||||
## createTimer(seconds: int, microseconds: int)
|
||||
|
||||
This function returns an `opaque` timer object, with seconds and microseconds set to the given values. To give a negative value between 0 and -1, give a negative value for microseconds (negative 0 is not a thing in Toy).
|
||||
|
||||
Please note that `microseconds` has upper and lower bounds of -1,000,000 to 1,000,000. Also, if seconds has a non-zero value, then microseconds has a lower bounds of 0 instead.
|
||||
|
||||
## fn _getTimerSeconds(self: opaque): int
|
||||
## _getTimerSeconds(self: opaque)
|
||||
|
||||
This function returns an integer value, representing the seconds value of the timer object.
|
||||
|
||||
## fn _getTimerMicroseconds(self: opaque): int
|
||||
## _getTimerMicroseconds(self: opaque)
|
||||
|
||||
This function returns an integer value, representing the seconds value of the timer object.
|
||||
|
||||
## fn _compareTimer(self: opaque, other: opaque): opaque
|
||||
## _compareTimer(self: opaque, other: opaque)
|
||||
|
||||
This function returns an `opaque` timer object, representing the duration between the `self` and `other` arguments. The return value may be negative.
|
||||
|
||||
## fn _timerToString(self: opaque): string
|
||||
## _timerToString(self: opaque)
|
||||
|
||||
This function returns a string representation of the `self` argument, which can be casted into other basic [types](types).
|
||||
|
||||
## fn _destroyTimer(self: opaque): null
|
||||
## _destroyTimer(self: opaque)
|
||||
|
||||
This function cleans up the memory of the `self` timer object.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user