[racket] the type of current-inexact-milliseconds

From: Alexander D. Knauth (alexander at knauth.org)
Date: Tue Jan 27 16:51:34 EST 2015

Okay, so would it always return a flonum?

On Jan 27, 2015, at 3:13 PM, Asumu Takikawa <asumu at ccs.neu.edu> wrote:

> On 2015-01-26 16:52:02 -0500, Alexander D. Knauth wrote:
>> Does current-inexact-milliseconds always return a positive flonum?
>> Would it ever not return a positive flonum, and if it doesn’t, should
>> the type of it in typed racket be changed?
> 
> It can return a negative number if you go back far enough in time:
> 
>  $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1 FAKETIME="-50y" racket
>  Welcome to Racket v6.1.1.6.
>  -> (current-inexact-milliseconds)
>  -154410580137.768
>  -> (require racket/date)
>  -> (date->string (current-date))
>  "Monday, February 8th, 1965"
> 
> Cheers,
> Asumu



Posted on the users mailing list.