
31 Jan
2005
31 Jan
'05
6:31 a.m.
It might be nice to have an overloaded TimeDiff: class TimeDiff a where diff :: TimeStamp -> TimeStamp -> a instance TimeDiff Double where... instance TimeDiff Integer where... with the difference being seconds. So if I'm working on a fine scale, I could use the Double instance (and remember to check the timer resolution), while on a greater scale, I could get an unlimited and accurate Integer number of seconds. (It would also be nice if two different invocations of getTimeStamp would always return different values, but that is perhaps difficult to implement/guarantee?) -kzm -- If I haven't seen further, it is by standing in the footprints of giants