Use clock_gettime (if available) to measure the process CPU time
authorSimon Marlow <marlowsd@gmail.com>
Mon, 13 Sep 2010 13:38:18 +0000 (13:38 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Mon, 13 Sep 2010 13:38:18 +0000 (13:38 +0000)
commit5e195173cd1921e838eb977f649ef178dff00415
treef74fb4521b4952c3041567de6f192d2a7fa77e94
parentabe2139ead3ec4aac34fee740eff89f1c50ccb56
Use clock_gettime (if available) to measure the process CPU time
This is much more accurate than getrusage, which was giving misleading
results when trying to time very quick operations like a minor GC.
rts/posix/GetTime.c