1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Rewrite time module

This commit is contained in:
ofunc
2019-06-27 18:02:47 +08:00
committed by Alexander Medvednikov
parent 223c35ffb9
commit 2ee6ca1b8b
9 changed files with 344 additions and 348 deletions

View File

@ -17,7 +17,7 @@ const (
TetroSize = 4
WinWidth = BlockSize * FieldWidth
WinHeight = BlockSize * FieldHeight
TimerPeriod = 250 // ms
TimerPeriod = time.milliseconds(250) // 250ms
)
const (
@ -168,7 +168,7 @@ fn (g mut Game) run() {
g.move_tetro()
g.delete_completed_lines()
glfw.post_empty_event() // force window redraw
time.sleep_ms(TimerPeriod)
time.sleep(TimerPeriod)
}
}