|
@@ -187,16 +187,19 @@ syscall
|
187
|
187
|
; set value for ts_sleep.tv_nsec given time_res
|
188
|
188
|
; div sleep time by 10 for each digits added bellow seconds
|
189
|
189
|
mov rax, 100000000
|
190
|
|
-mov r8, [time_res]
|
191
|
|
-mov r9, 10
|
|
190
|
+xor rcx, rcx
|
|
191
|
+mov cl, [time_res]
|
|
192
|
+dec cl
|
|
193
|
+test cl, cl
|
|
194
|
+jz setsleep_loopend
|
|
195
|
+
|
|
196
|
+mov rbx, 10
|
192
|
197
|
xor rdx, rdx
|
193
|
198
|
setsleep_loop:
|
194
|
|
- cmp r8, 1
|
195
|
|
- jle setsleep_endloop
|
196
|
|
- div r9
|
197
|
|
- sub r8, 1
|
198
|
|
- jmp setsleep_loop
|
199
|
|
-setsleep_endloop:
|
|
199
|
+ div rbx
|
|
200
|
+ loop setsleep_loop
|
|
201
|
+setsleep_loopend:
|
|
202
|
+
|
200
|
203
|
mov [ts_sleep.tv_nsec], rax
|
201
|
204
|
|
202
|
205
|
std ; set DF for string operations
|