time() return milliseconds (#3811)

This commit is contained in:
Krasi Georgiev 2018-02-08 13:39:13 +02:00 committed by Brian Brazil
parent 404b306fb9
commit 4801573b64
2 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,7 @@ type Function struct {
// === time() float64 ===
func funcTime(ev *evaluator, args Expressions) Value {
return Scalar{
V: float64(ev.Timestamp / 1000),
V: float64(ev.Timestamp) / 1000,
T: ev.Timestamp,
}
}

View File

@ -434,6 +434,9 @@ clear
eval instant at 0m year()
{} 1970
eval instant at 1ms time()
0.001
eval instant at 0m year(vector(1136239445))
{} 2006