I'm using gtk2hs (although I might try and see how wxHaskell compares when I've got more working).
That depends on the type of GUI you are using, of course. If you use wxHaskell, you can do it like this:On Sat, 24 Jul 2010 22:09:15 +0200, Alex Rozenshteyn <rpglover64@gmail.com> wrote:
I'm trying to write a simple timer application (mostly to learn gui
programming), and I'd like it to display 1/100ths of a second. I know I can
fake this with threadDelay, but I was wondering if there's a way to get
current time to more precision than one second.
t <- timer f [ interval := 10
, on command := repaint
]
where f is the frame handle; you don't need to use t anywhere. The interval is defined in milliseconds.
Regards,
Henk-Jan van Tuyl
--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--