// Copyright 2013-2014 Fuzamei tech Ltd. All rights reserved. package market // 本文件测试pconv周期转换接口 import ( "log" "testing" "time" ) func TestConvTS(t *testing.T) { tm := time.Now() log.Println(tm) ts := int64(float64(tm.UnixNano()) * 1e-6) log.Println("ts:", getTime(ts)) tm1 := convTS(ts, M1) log.Println("m1:", getTime(tm1)) tm5 := convTS(ts, M5) log.Println("m5:", getTime(tm5)) th1 := convTS(ts, H1) log.Println("h1:", getTime(th1)) td1 := convTS(ts, D1) log.Println("d1:", getTime(td1)) }