Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
2279:32a407902d3b | 2280:985c8016b592 |
---|---|
4085 | 4085 |
4086 uw_Basis_int uw_Basis_toMilliseconds(uw_context ctx, uw_Basis_time tm) { | 4086 uw_Basis_int uw_Basis_toMilliseconds(uw_context ctx, uw_Basis_time tm) { |
4087 return tm.seconds * 1000 + tm.microseconds / 1000; | 4087 return tm.seconds * 1000 + tm.microseconds / 1000; |
4088 } | 4088 } |
4089 | 4089 |
4090 uw_Basis_time uw_Basis_fromMilliseconds(uw_context ctx, uw_Basis_int n) { | |
4091 uw_Basis_time tm = {n / 1000, n % 1000 * 1000}; | |
4092 return tm; | |
4093 } | |
4094 | |
4090 uw_Basis_int uw_Basis_diffInMilliseconds(uw_context ctx, uw_Basis_time tm1, uw_Basis_time tm2) { | 4095 uw_Basis_int uw_Basis_diffInMilliseconds(uw_context ctx, uw_Basis_time tm1, uw_Basis_time tm2) { |
4091 return uw_Basis_toMilliseconds(ctx, tm2) - uw_Basis_toMilliseconds(ctx, tm1); | 4096 return uw_Basis_toMilliseconds(ctx, tm2) - uw_Basis_toMilliseconds(ctx, tm1); |
4092 } | 4097 } |
4093 | 4098 |
4094 uw_Basis_int uw_Basis_toSeconds(uw_context ctx, uw_Basis_time tm) { | 4099 uw_Basis_int uw_Basis_toSeconds(uw_context ctx, uw_Basis_time tm) { |