|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block. More...
#include <chrono>#include <cstdint>Functions | |
| int64_t | sfs3::util::currentMillis () |
| Returns the current time as milliseconds since the Unix epoch. | |
| int64_t | sfs3::util::nanoTime () |
| Monotonic high-resolution timer, mirroring Java's System.nanoTime(). | |
Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block.
|
inline |
Returns the current time as milliseconds since the Unix epoch.
It reads the wall clock, so the value can jump backwards or forwards when the system clock is corrected. Use it for timestamps only; to measure an interval use a steady clock instead.
|
inline |
Monotonic high-resolution timer, mirroring Java's System.nanoTime().
Returns a nanosecond count from an arbitrary, fixed origin. Only the difference between two calls is meaningful; the absolute value has no relation to wall-clock time or any epoch. Use for measuring elapsed intervals, never for timestamps – for those use currentMillis().