monitor time for javascript