mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
remove use of currentTimeMillis for the go time.Time stuff
This commit is contained in:
parent
73bbc2a150
commit
a669134873
@ -48,7 +48,7 @@ func (l *Lexer) Tokenize() []*Token {
|
||||
|
||||
startPos := l.pos
|
||||
for l.hasNext() {
|
||||
// we run into a layout pos
|
||||
// we run into a layout character
|
||||
if l.peek() <= ' ' {
|
||||
break
|
||||
}
|
||||
|
6
main.go
6
main.go
@ -129,7 +129,7 @@ func main() {
|
||||
|
||||
editor.init(&config)
|
||||
|
||||
timer := strife.CurrentTimeMillis()
|
||||
lastDebugRender := time.Now()
|
||||
frames, updates := 0, 0
|
||||
fps, ups := frames, updates
|
||||
|
||||
@ -161,8 +161,8 @@ func main() {
|
||||
}
|
||||
updates += 1
|
||||
|
||||
if strife.CurrentTimeMillis()-timer > 1000 {
|
||||
timer = strife.CurrentTimeMillis()
|
||||
if time.Now().Sub(lastDebugRender) >= time.Second {
|
||||
lastDebugRender = time.Now()
|
||||
fps, ups = frames, updates
|
||||
frames, updates = 0, 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user