I write one go code like this, strconv.Itoa(time.Nanoseconds())
. But, it is giving me this error "cannot use time.Nanoseconds() (type int64) as type int in function argument". How can I solve this ?
strconv.Itoa(time.Nanoseconds())-错误
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- dongyiluan1718 2011-12-01 16:29关注
For example,
package main import ( "fmt" "strconv" "time" ) func main() { t := strconv.FormatInt(time.Nanoseconds(), 10) fmt.Println(t) }
Output:
1322756865962046000
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 weditor无法连接模拟器Local server not started, start with?
- ¥20 6-3 String类定义
- ¥15 嵌入式--定时器使用
- ¥15 基于OPENCV的人脸识别
- ¥20 51单片机学习中的问题
- ¥30 Windows Server 2016利用兩張網卡處理兩個不同網絡
- ¥15 Python中knn问题
- ¥15 使用C#,asp.net读取Excel文件并保存到Oracle数据库
- ¥15 C# datagridview 单元格显示进度及值
- ¥15 thinkphp6配合social login单点登录问题