remove use of currentTimeMillis for the go time.Time stuff

This commit is contained in:
Felix Angell 2018-04-21 19:37:53 +01:00
parent 73bbc2a150
commit a669134873
2 changed files with 4 additions and 4 deletions

View File

@ -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
}

View File

@ -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
}