Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-delay
Commits
2cb8bd4d
Commit
2cb8bd4d
authored
Nov 09, 2018
by
hannahhoward
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move defer to correct position
parent
83086b56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
delay.go
delay.go
+1
-1
No files found.
delay.go
View file @
2cb8bd4d
...
@@ -38,8 +38,8 @@ func (d *delay) Set(t time.Duration) time.Duration {
...
@@ -38,8 +38,8 @@ func (d *delay) Set(t time.Duration) time.Duration {
func
(
d
*
delay
)
Wait
()
{
func
(
d
*
delay
)
Wait
()
{
nextWaitTime
:=
d
.
NextWaitTime
()
nextWaitTime
:=
d
.
NextWaitTime
()
d
.
l
.
RLock
()
d
.
l
.
RLock
()
time
.
Sleep
(
nextWaitTime
)
defer
d
.
l
.
RUnlock
()
defer
d
.
l
.
RUnlock
()
time
.
Sleep
(
nextWaitTime
)
}
}
func
(
d
*
delay
)
NextWaitTime
()
time
.
Duration
{
func
(
d
*
delay
)
NextWaitTime
()
time
.
Duration
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment