messing with headers

This commit is contained in:
2022-11-12 22:47:57 +11:00
committed by GitHub
parent b4c18cac12
commit db868530c0
2 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ The standard library can usually be accessed with the `import` keyword:
import standard; import standard;
``` ```
## fn clock(): string ## clock()
This function returns the current timestamp. This function returns the current timestamp.

View File

@@ -10,37 +10,37 @@ The timer library can usually be accessed with the `import` keyword:
import timer; import timer;
``` ```
## fn startTimer(): opaque ## startTimer()
This function returns an `opaque` timer object, representing the point in time when the function was called. 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. 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). 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. 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. 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. 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. 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). 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. This function cleans up the memory of the `self` timer object.