更改golang测试/基准时间单位结果

Currently when doing a golang benchmark on a small function I have in golang I get the following results

go test -bench=.

Output:

BenchmarkBcrypt10-4     1000000000           0.08 ns/op
BenchmarkBcrypt15-4            1    2607594388 ns/op
BenchmarkBcrypt18-4            1    20472224268 ns/op
PASS

Is there anyway to change the time unit from ns to milisecons or seconds?

Update:

This is my benchmark file (bcrypt_test.go):

package main

import "testing"

func BenchmarkBcrypt10(b *testing.B){
    HashPassword("my pass", 10)
}

func BenchmarkBcrypt15(b *testing.B){
    HashPassword("my pass", 15)
}


func BenchmarkBcrypt18(b *testing.B){
    HashPassword("my pass", 18)
}

and my main.go:

package main

import (
    "fmt"

    "golang.org/x/crypto/bcrypt"
)

func HashPassword(password string, cost int) (string, error) {
    bytes, err := bcrypt.GenerateFromPassword([]byte(password), cost)
    return string(bytes), err
}

func CheckPasswordHash(password, hash string) bool {
    err := bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
    return err == nil
}

func main() {
    password := "secret"
    hash, _ := HashPassword(password, 12) // ignore error for the sake of simplicity

    fmt.Println("Password:", password)
    fmt.Println("Hash:    ", hash)

    match := CheckPasswordHash(password, hash)
    fmt.Println("Match:   ", match)
}