コード例 #1
0
ファイル: foosbot_test.go プロジェクト: alevinval/foosbot
func benchmarkStoreState(b *testing.B, c *foosbot.Context) {
	b.ResetTimer()
	b.ReportAllocs()
	for i := 0; i < b.N; i++ {
		c.Store()
	}
}
コード例 #2
0
ファイル: main.go プロジェクト: alevinval/foosbot
func backup(c *foosbot.Context) {
	for {
		time.Sleep(1 * time.Hour)
		c.Store()
	}
}