An example C++ module for node.js that exports several synchronous time functions
This is a node.js module, writen in C++, that implements some missing time functions, such as getting timeval struct and getting unix time.
The module exports three functions:
* getUnixTime - returns seconds since 1970, Jan 1 (+/- timezone offset) * getTimeval - returns timeval struct as object with .sec and .usec props * getMilliseconds - returns milliseconds since 1970, Jan 1 (+/- tz offset)
See examples/ dir for working examples.
node-waf configure build
The module will be called
time.node. To use it, make sure it's in NODE_PATH.
This library was written for my and SubStack's StackVM startup:
Have fun with time!
Sincerely, Peteris Krumins http://www.catonmat.net