Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GTHashRateFormat ¶ added in v0.0.44
GTHashRateFormat 哈希显示单位计算公式 以H/s 为单位传入,根据数值不同换算成进制单位MH/s、GH/s等, 默认保留3位小数点 hs Hash算力值
func GTHashRateFormatWithSed ¶ added in v0.0.44
GTHashRateFormatWithSed 哈希显示单位计算公式 以H/s 为单位传入,根据数值不同换算成进制单位PH/s、EH/s、ZH/s、YH/s等 hs Hash算力值 fSed 此参数标识保留机位小数点
func HashRateFormat ¶ added in v0.1.52
HashRateFormat 哈希显示单位计算公式 以H/s 为单位传入,根据数值不同换算成进制单位MH/s、GH/s等, 默认保留3位小数点 hs Hash算力值
Types ¶
type GTHashRate ¶ added in v0.0.50
type GTHashRate struct { Value string UnitStr string UnitFlag HashRateUnitFormat }
func GTHashRate2Format ¶ added in v0.0.50
func GTHashRate2Format(baseHashRate *big.Float, toFormat HashRateUnitFormat, fSed int) *GTHashRate
GTHashRate2Format 强制转换成某一个Hash单位类型 baseHashRate 基础H/s为单位的 HashRate值 toFormat 要转换成的HashRate计量单位类型 fSed 保留小数点后几位 Return[GTHashRate] 返回值
type HashRateUnitFormat ¶ added in v0.0.50
type HashRateUnitFormat int64
const ( HashRateUnitFormatHs HashRateUnitFormat = iota // H/s 默认值 HashRateUnitFormatKHs // KH/s HashRateUnitFormatMHs // MH/s HashRateUnitFormatGHs // GH/s HashRateUnitFormatTHs // TH/s HashRateUnitFormatPHs // PH/s HashRateUnitFormatEHs // EH/s HashRateUnitFormatZHs // ZH/s HashRateUnitFormatYHs // YH/s )
func (HashRateUnitFormat) String ¶ added in v0.0.50
func (unitFormat HashRateUnitFormat) String() string
Click to show internal directories.
Click to hide internal directories.