本文整理匯總了Golang中github.com/FactomProject/factomd/state.State.SetLeaderTimestamp方法的典型用法代碼示例。如果您正苦於以下問題:Golang State.SetLeaderTimestamp方法的具體用法?Golang State.SetLeaderTimestamp怎麽用?Golang State.SetLeaderTimestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/FactomProject/factomd/state.State
的用法示例。
在下文中一共展示了State.SetLeaderTimestamp方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Factomd
func Factomd() {
log.Print("//////////////////////// Copyright 2015 Factom Foundation")
log.Print("//////////////////////// Use of this source code is governed by the MIT")
log.Print("//////////////////////// license that can be found in the LICENSE file.")
log.Printf("Go compiler version: %s\n", runtime.Version())
log.Printf("Using build: %s\n", Build)
if !isCompilerVersionOK() {
for i := 0; i < 30; i++ {
log.Println("!!! !!! !!! ERROR: unsupported compiler version !!! !!! !!!")
}
time.Sleep(3 * time.Second)
os.Exit(1)
}
// Go Optimizations...
runtime.GOMAXPROCS(runtime.NumCPU())
state0 := new(state.State)
state0.SetLeaderTimestamp(primitives.NewTimestampFromMilliseconds(0))
fmt.Println("len(Args)", len(os.Args))
NetStart(state0)
}