adjust FlushTime from time.Duration to int

adjust FlushTime from type "time.Duration" to "int",  means Millisecond