Switch to using float64 for run durations
Signed-off-by: AKU <tom@tdpain.net>
This commit is contained in:
parent
34028fa131
commit
a0a651f8f6
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ type Result struct {
|
|||
TaskID string `json:"task_id"`
|
||||
Ok bool `json:"ok"`
|
||||
Output string `json:"output"`
|
||||
Duration float32 `json:"duration"`
|
||||
Duration float64 `json:"duration"`
|
||||
}
|
||||
|
||||
func makeErrorChan(err error) chan ResultOrError {
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
chcode "{{ .ImportPath }}"
|
||||
)
|
||||
|
||||
func sendResult(taskID string, ok bool, output string, duration float32) {
|
||||
func sendResult(taskID string, ok bool, output string, duration float64) {
|
||||
x := runners.Result{
|
||||
TaskID: taskID,
|
||||
Ok: ok,
|
||||
|
@ -62,7 +62,7 @@ func run() error {
|
|||
res, err := run()
|
||||
endTIme := time.Now()
|
||||
|
||||
runningTime := float32(endTIme.Sub(startTime).Seconds())
|
||||
runningTime := endTIme.Sub(startTime).Seconds()
|
||||
|
||||
if err != nil {
|
||||
sendResult(task.TaskID, false, err.Error(), runningTime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue