summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-11-12 08:46:51 -0500
committerGravatar Ziv Scully <ziv@mit.edu>2015-11-12 08:46:51 -0500
commit6205c6660874af4147828e2610ca5c2feec834ad (patch)
tree3ae1ba40102d50b2e3c434a993e92d3d21d24987 /src/c
parent7b14b2f01fd0218c0bbe0a5c4071fff190c91ce1 (diff)
parentdc8c8ed99b79e4f3c3c38f131dd7563148524591 (diff)
Merge.
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 09d04f1c..30619314 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -4087,6 +4087,11 @@ uw_Basis_int uw_Basis_toMilliseconds(uw_context ctx, uw_Basis_time tm) {
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);
}