Yes, that works for me too, but this doesn't:
lister:~> cat foo.pike int main() { int ts = time(); while (time() < ts + 10) {} werror ("elapsed: %d\n", time() - ts); } lister:~> d-pike --dumpversion 7.5.12 lister:~> d-pike foo.pike elapsed: 0
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-15 20:13: Subject: time() and optimization again
Well, it appears to work for me.
[nilsson@mahoro src]$ pike --dumpversion 7.5.9 [nilsson@mahoro src]$ time pike -e 'int ts=time()+10; while(time()<ts);'
real 0m9.374s user 0m5.310s sys 0m4.070s
/ Martin Nilsson (saturator)