Fun 0.41.5
The programming language that makes You have fun
Loading...
Searching...
No Matches
time_now_ms.c File Reference

Implements OP_TIME_NOW_MS to push current wall-clock time in ms since Unix epoch. More...

#include <stdint.h>
#include <time.h>
Include dependency graph for time_now_ms.c:

Go to the source code of this file.

Functions

 push_value (vm, make_int(ms))

Variables

case OP_TIME_NOW_MS
time_t s = time(NULL)
 ms = (int64_t)s * 1000
 break

Detailed Description

Implements OP_TIME_NOW_MS to push current wall-clock time in ms since Unix epoch.

Stack before: [] Stack after: [int ms]

Definition in file time_now_ms.c.

Function Documentation

◆ push_value()

push_value(vm,
make_int(ms) )

Variable Documentation

◆ break

break

Definition at line 36 of file time_now_ms.c.

◆ ms

ms = (int64_t)s * 1000

Definition at line 33 of file time_now_ms.c.

◆ OP_TIME_NOW_MS

case OP_TIME_NOW_MS

Definition at line 21 of file time_now_ms.c.

◆ s

time_t s = time(NULL)

Definition at line 32 of file time_now_ms.c.