mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve package gtimer
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
// Copyright GoFrame Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
@ -36,8 +36,8 @@ const (
|
||||
gPANIC_EXIT = "exit" // Internal usage for custom job exit function with panic.
|
||||
gDEFAULT_TIMES = math.MaxInt32 // Default limit running times, a big number.
|
||||
gDEFAULT_SLOT_NUMBER = 10 // Default slot number.
|
||||
gDEFAULT_WHEEL_INTERVAL = 50 // Default wheel interval.
|
||||
gDEFAULT_WHEEL_LEVEL = 6 // Default wheel level.
|
||||
gDEFAULT_WHEEL_INTERVAL = 100 // Default wheel interval.
|
||||
gDEFAULT_WHEEL_LEVEL = 5 // Default wheel level.
|
||||
gCMDENV_KEY = "gf.gtimer" // Configuration key for command argument or environment.
|
||||
)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
// Copyright GoFrame Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
@ -24,6 +24,8 @@ func (w *wheel) start() {
|
||||
w.proceed()
|
||||
|
||||
case STATUS_STOPPED:
|
||||
// Do nothing.
|
||||
|
||||
case STATUS_CLOSED:
|
||||
ticker.Stop()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user