Feat: session table and interface
This commit is contained in:
@ -21,15 +21,12 @@ var (
|
||||
func StartTurnTimer(roomID string, duration time.Duration) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
|
||||
if _, exists := timers[roomID]; exists {
|
||||
return // Timer already running
|
||||
}
|
||||
|
||||
ticker := time.NewTicker(1 * time.Second)
|
||||
done := make(chan bool)
|
||||
timers[roomID] = &roomTimer{ticker: ticker, done: done}
|
||||
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
|
Reference in New Issue
Block a user