From ef35d21a310472b1d14cbabba1c5e2336d2b0d91 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Tue, 27 Jan 2015 20:30:28 -0500 Subject: [PATCH] Refine type of current-inexact-milliseconds. Thanks to Alex Knauth for the report. --- typed-racket-lib/typed-racket/base-env/base-env.rkt | 2 +- typed-racket-test/unit-tests/typecheck-tests.rkt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/typed-racket-lib/typed-racket/base-env/base-env.rkt b/typed-racket-lib/typed-racket/base-env/base-env.rkt index 2288e3eb..b2e4cc42 100644 --- a/typed-racket-lib/typed-racket/base-env/base-env.rkt +++ b/typed-racket-lib/typed-racket/base-env/base-env.rkt @@ -2829,7 +2829,7 @@ (-Integer Univ . -> . -Date))] [current-seconds (-> -Integer)] [current-milliseconds (-> -Fixnum)] -[current-inexact-milliseconds (-> -Real)] +[current-inexact-milliseconds (-> -Flonum)] [current-gc-milliseconds (-> -Fixnum)] [current-process-milliseconds (->opt [(Un (-val #f) (-val 'subprocesses) -Thread)] -Fixnum)] diff --git a/typed-racket-test/unit-tests/typecheck-tests.rkt b/typed-racket-test/unit-tests/typecheck-tests.rkt index 3eab4ee8..2d300b48 100644 --- a/typed-racket-test/unit-tests/typecheck-tests.rkt +++ b/typed-racket-test/unit-tests/typecheck-tests.rkt @@ -1815,6 +1815,7 @@ (make-Evt -String)) (tc-e (sync (replace-evt always-evt (lambda (x) 3))) (-mu x (make-Evt x))) + (tc-e (current-inexact-milliseconds) -Flonum) (tc-e (sync (replace-evt always-evt (lambda (x) (alarm-evt (+ (current-inexact-milliseconds) 1000))))) (-mu x (make-Evt x)))