Mercurial > urweb
diff src/c/urweb.c @ 2280:985c8016b592
Merge.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Thu, 12 Nov 2015 08:46:51 -0500 |
parents | 32a407902d3b 14c45a0b6362 |
children | 75cb60a7f6f1 |
line wrap: on
line diff
--- a/src/c/urweb.c Wed Nov 11 20:01:48 2015 -0500 +++ b/src/c/urweb.c Thu Nov 12 08:46:51 2015 -0500 @@ -4087,6 +4087,11 @@ return tm.seconds * 1000 + tm.microseconds / 1000; } +uw_Basis_time uw_Basis_fromMilliseconds(uw_context ctx, uw_Basis_int n) { + uw_Basis_time tm = {n / 1000, n % 1000 * 1000}; + return tm; +} + uw_Basis_int uw_Basis_diffInMilliseconds(uw_context ctx, uw_Basis_time tm1, uw_Basis_time tm2) { return uw_Basis_toMilliseconds(ctx, tm2) - uw_Basis_toMilliseconds(ctx, tm1); }