CLIM mail archive

[Prev][Next][Index][Thread]

A Kinder Gentler Event Loop



Yes, SLEEP takes a real, not an integer.  So fractions are ok.
Unlike all the other time functions, which take only integers.

Of course, the granularity is not specified, so saying 0.5 might
not promise you a wakeup to that granularity.  (And, frankly, saying
1 may not guarantee that you get woken up in one second either...)
But at least you can say what you want and then quibble with your
vendor if he doesn't interpret your semantically-well-defined request
in a way that is adequate for your task.

But the arg conventions leave me in a quandry editorially.  I -really- 
want to define an absolute universal time as a positive real number of 
seconds since 1900, and to define a relative universal time as a positive
real number of seconds (i.e., a "time interval").  But all the things
which take absolute universal times insist on integers, so overgeneralizing
the term might be confusing.  And all the things which take relative
universal times (which actually is only one -- SLEEP) take real numbers,
so if I talk about SLEEP's argument as a relative universal time, everyone
wonders why it can take fractions as arguments.  I suppose I could say that
an absolute universal time is an integer and a relative universal time
is a real, but that seems silly and ties the hands of implementors who want
to add other functions on absolute and relative times.  I'm inclined to
believe that the other time functions should take reals as arguments as
well, and implementations could just coerce them to integers first thing 
if they weren't going to care about the fraction...   What a mess.


0,,

References:

Main Index | Thread Index