|
@@ -14,7 +14,7 @@ var CountDowner = function()
|
|
|
nowTime = new Date();
|
|
|
cur_sec = parseInt(nowTime.getTime() / 1000);
|
|
|
this.delta_secs = this.server_time - cur_sec;
|
|
|
- }
|
|
|
+ };
|
|
|
|
|
|
this.run = function ()
|
|
|
{
|
|
@@ -32,16 +32,12 @@ var CountDowner = function()
|
|
|
this.add_zero(left_h,"hour");
|
|
|
this.add_zero(left_m,"min");
|
|
|
this.add_zero(left_s,"second");
|
|
|
- }
|
|
|
- this.isEnd = function () {
|
|
|
+ };
|
|
|
+ this.isEnd = function ()
|
|
|
+ {
|
|
|
left_secs = this.start_time - (parseInt(nowTime.getTime() / 1000) + this.delta_secs);
|
|
|
- if(left_secs > 0) {
|
|
|
- return false;
|
|
|
- } else {
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ return (left_secs <= 0);
|
|
|
+ };
|
|
|
this.add_zero = function (time, id)
|
|
|
{
|
|
|
if(time<10){
|