diff src/c/urweb.c @ 1514:3c0803c1acd7

Backpedal on tutorial-motivated urweb-mode changes; add Basis.diffInSeconds and Basis.toSeconds
author Adam Chlipala <adam@chlipala.net>
date Fri, 22 Jul 2011 15:39:38 -0400
parents dcc8abbc6dfd
children 5175bed443f9
line wrap: on
line diff
--- a/src/c/urweb.c	Wed Jul 20 08:14:49 2011 -0400
+++ b/src/c/urweb.c	Fri Jul 22 15:39:38 2011 -0400
@@ -3664,6 +3664,14 @@
   return tm;
 }
 
+uw_Basis_int uw_Basis_diffInSeconds(uw_context ctx, uw_Basis_time tm1, uw_Basis_time tm2) {
+  return difftime(tm2.seconds, tm1.seconds);
+}
+
+uw_Basis_int uw_Basis_toSeconds(uw_context ctx, uw_Basis_time tm) {
+  return tm.seconds;
+}
+
 void *uw_get_global(uw_context ctx, char *name) {
   int i;