mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
server: use timers only when needed
This commit is contained in:
11
emptytimer.go
Normal file
11
emptytimer.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package gortsplib
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func emptyTimer() *time.Timer {
|
||||
t := time.NewTimer(0)
|
||||
<-t.C
|
||||
return t
|
||||
}
|
Reference in New Issue
Block a user