summaryrefslogtreecommitdiff
path: root/src/c
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2015-11-22 10:39:36 -0500
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2015-11-22 10:39:36 -0500
commitbf037ce78c2c76a34ecca0fb8bafa5d5be38968a (patch)
tree3e91b0d0e8e0fb704c7df444283b6c8c63351f95 /src/c
parent7d861ea0debf944cb8e3e38d73a8c0197de574b3 (diff)
parent638e838a81e1ccc6594fda1920df441eb21577ae (diff)
Merge branch 'upstream' into dfsg_clean20151122+dfsg
Diffstat (limited to 'src/c')
-rw-r--r--src/c/urweb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index d656ae03..169152dc 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -806,9 +806,6 @@ static void uw_try_reconnecting(uw_context ctx) {
ctx->db = NULL;
}
ctx->app->db_init(ctx);
-
- if (!ctx->db)
- uw_error(ctx, FATAL, "Error reopening database connection");
}
void uw_try_reconnecting_and_restarting(uw_context ctx) {
@@ -4063,6 +4060,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);
}