fix
This commit is contained in:
parent
2039414e2a
commit
baba117865
|
@ -97,11 +97,11 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
//转换unity真实处理时间
|
//转换unity真实处理时间
|
||||||
duration, err := time.Parse("15:04:05.9999999", req.CostTime)
|
duration, err := time.Parse("15:04:05.9999999", req.CostTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("解析时间错误:", err)
|
logx.Error("解析时间错误:", err)
|
||||||
return resp.SetStatusWithMessage(basic.CodeFileUploadErr, "转换unity时间错误")
|
return resp.SetStatusWithMessage(basic.CodeFileUploadErr, "转换unity时间错误")
|
||||||
}
|
}
|
||||||
// 将时间对象转换为毫秒数
|
// 将时间对象转换为毫秒数
|
||||||
unityRealTakesTime := duration.Nanosecond() / 1e6 + duration.Second()*1000 + duration.Minute() * 6000 + duration.Hour()*3600000
|
unityRealTakesTime := duration.Nanosecond()/1e6 + duration.Second()*1000 + duration.Minute()*6000 + duration.Hour()*3600000
|
||||||
if ws.conn != nil {
|
if ws.conn != nil {
|
||||||
//发送到出口
|
//发送到出口
|
||||||
ws.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
ws.sendRenderResultData(websocket_data.RenderImageRspMsg{
|
||||||
|
@ -110,7 +110,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
RenderProcessTime: &websocket_data.RenderProcessTime{
|
RenderProcessTime: &websocket_data.RenderProcessTime{
|
||||||
UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime),
|
UnityRenderTakesTime: fmt.Sprintf("%dms", unityRenderEndTime-unityRenderBeginTime),
|
||||||
UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime),
|
UploadUnityRenderImageTakesTime: fmt.Sprintf("%dms", uploadUnityRenderImageTakesTime),
|
||||||
UnityRealTakesTime: fmt.Sprintf("%dms",unityRealTakesTime),
|
UnityRealTakesTime: fmt.Sprintf("%dms", unityRealTakesTime),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
logx.Info("渲染回调成功,渲染结果图片为:", uploadRes.ResourceUrl)
|
logx.Info("渲染回调成功,渲染结果图片为:", uploadRes.ResourceUrl)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user