implemented measurements using getTime and getMilliseconds