UnixNano
Get the nanosecond-level timestamp of the current moment.
UnixNano()Examples
If you need to get a millisecond-level timestamp, you can use the following code.
javascript
function main() {
var time = UnixNano() / 1000000
Log(_N(time, 0))
}
python
def main():
time = UnixNano() // 1000000
Log(time)
rust
fn main() {
let time = UnixNano() / 1000000;
Log!(_N(time, 0));
}Returns
| Type | Description |
number | Nanosecond-level timestamp. |
See Also