A Panic happened when I use NewSlidingWindowWithTSExtractor
transfercai opened this issue · comments
transfercai commented
I want to make my own timestamp func by using NewSlidingWindowWithTSExtractor, here is my code:
var elemTSExtractor = func(elem interface{}) int64 { fmt.Println("<------------------->") fmt.Println(elem) return time.Now().UnixNano() } k.slidingWindow = flow.NewSlidingWindowWithTSExtractor(time.Second*30, time.Second*5, elemTSExtractor)
bug got a panic. how can i use my own timestamp in sliding window.