标签:tostring osc cond tar lis code blog span builder
1 package main 2 3 import ( 4 "fmt" 5 "git.oschina.net/ha666/golibs" 6 "time" 7 ) 8 9 func main() { 10 var counts uint64 = 0 11 var index int = 0 12 var start int64 = golibs.UnixNano() 13 var end int64 = golibs.UnixNano() 14 for { 15 index++ 16 time.Sleep(time.Millisecond) 17 var data *golibs.StringBuilder = golibs.NewStringBuilder() 18 data.Append("sajdflksad") 19 data.Append("\tjaksldflksafdlkj\t") 20 data.Append(time.Now().UnixNano()) 21 abc := data.ToString() 22 if len(abc) <= 0 { 23 fmt.Println("出错") 24 } 25 if index >= 10000 { 26 counts++ 27 end = golibs.UnixNano() 28 fmt.Println(golibs.StandardTime(), "\t", (end-start)/1000000, "\t", counts, "\r\n") 29 start = golibs.UnixNano() 30 index = 0 31 } 32 } 33 }
标签:tostring osc cond tar lis code blog span builder
原文地址:http://www.cnblogs.com/ha666/p/6710290.html