Correct. There are several system calls involving time. Mostly(?) they're in nanoseconds rather than milliseconds. The conversion should be obvious...
global _start
; nasm -f elf32 delay.asm
; ld -o delay delay.o -m elf_i386
section .data
msg db "read me quick!", 10
msg_len equ $ - msg
section .text
_start:
mov eax, 4 ; sys_write
mov ebx, 1 ; stdout
mov ecx, msg
mov edx, msg_len
int 80h
; put a time structure on the stack
push 0 ; nanoseconds
push 2 ; seconds
mov eax, 162 ; sys_nanosleep
mov ebx, esp ;point to our time structure (requested)
mov ecx, esp ; " (remaining)
int 80h
add esp, 8 ; "free" our time structure
mov eax, 1 ; sys_exit
mov ebx, 0 ; pretend no error
int 80h
I've got one using sys_gettimeofday which defines the structure a little more clearly. It does not work properly. The late Chuck Crayne, former moderator of news:comp.lang.asm.x86 and a mentor to some of us, tossed out a challenge/example to display the time "like C". I had something that I thought worked, though rather naive. I happened to try it one New Year's Eve. It informed me that it was some time on January zeroth. Oops! Before I got it fixed it was the first. I think I left it in a screwed up state. Been meaning to set my clock to New Year's Eve, or work on it some New Year's Eve. I can post it if you want, but it is known to be incorrect.
Best,
Frank