minor refactoring 2
This commit is contained in:
@@ -114,7 +114,7 @@ func RecvVerdictRequest() (*VerdictRequest, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
timestamp := time.Now()
|
timestamp := time.Now()
|
||||||
defer log.Tracef("winkext: getting verdict request took %s", time.Now().Sub(timestamp))
|
defer log.Tracef("winkext: getting verdict request took %s", time.Since(timestamp))
|
||||||
// Initialize struct for the output data
|
// Initialize struct for the output data
|
||||||
var new VerdictRequest
|
var new VerdictRequest
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ func waitForServiceStatus(handle windows.Handle, neededStatus uint32, timeLimit
|
|||||||
return false, fmt.Errorf("failed while waiting for service to start: %w", err)
|
return false, fmt.Errorf("failed while waiting for service to start: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if time.Now().Sub(start) > timeLimit {
|
if time.Since(start) > timeLimit {
|
||||||
return false, fmt.Errorf("time limit reached")
|
return false, fmt.Errorf("time limit reached")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user