summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-07-22 15:39:38 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2011-07-22 15:39:38 -0400
commitc723667d402b730edc4059cb132587977893b42a (patch)
tree6656ba1a78bd4eb71c381dc95d2e7b1a8ce6b130 /src/c
parent02d95a3ae4ed3519b082fe49616e493572e68e83 (diff)
Backpedal on tutorial-motivated urweb-mode changes; add Basis.diffInSeconds and Basis.toSeconds
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 4d2de1dd..641c6c83 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -3664,6 +3664,14 @@ uw_Basis_time uw_Basis_addSeconds(uw_context ctx, uw_Basis_time tm, uw_Basis_int
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;