Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

nsSince

Nanoseconds passed since a server timestamp.

main.nsSince
pub fn nsSince(server_timestamp: i64) i64

File

lib/build-web/main.zig:193

Code

pub fn nsSince(server_timestamp: i64) i64 {
    const ms_passed = js.timestamp() - client_base_timestamp;
    const ns_passed = server_base_timestamp - server_timestamp;
    return ns_passed + ms_passed * std.time.ns_per_ms;
}