Replaced timestamp with the more reliable systime_get_ms()