I was able to get it in seconds, but how to get the value of milliseconds? I am trying with the gettimeofday system call:
sys_gettimeofday_ms:
enter $0, $0
pushq $0
pushq $2
leaq -16(%rbp), %rdi
mov $96, %rax
syscall
movq -16(%rbp), %rax
leave
ret
This might work (untested), targeting x86_64 Linux.