gettime: fix cycles_per_msec overflow when using 32 bit longs