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