diff --git a/src/tink/state/ObservableDate.hx b/src/tink/state/ObservableDate.hx index 1a95cce..1cea012 100644 --- a/src/tink/state/ObservableDate.hx +++ b/src/tink/state/ObservableDate.hx @@ -46,7 +46,7 @@ class ObservableDate implements ObservableObject { var state = new State(false); function schedule() { if (now == null) now = Date.now().getTime(); - switch Std.int(now - stamp) { + switch Std.int(stamp - now) { case _ < 0 => true: // overflow now = null; haxe.Timer.delay(schedule, 1 << 30);