dev_home
daiao 5 years ago
parent 28a4fa9c66
commit 361647cf23

@ -767,8 +767,8 @@ class GamesController < ApplicationController
# 记录实训花费的时间
# REDO:需要添加详细的说明
def cost_time
return if @game.status >= 2
cost_time = Time.now.to_i - @game.close_browse_time.to_i
#return if @game.status >= 2
cost_time = (Time.now.to_i - @game.close_browse_time.to_i) + @game.cost_time.to_i
@game.update_attributes(close_browse_time: Time.now, cost_time: cost_time)
end

Loading…
Cancel
Save