fixed
This commit is contained in:
@@ -75,16 +75,14 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String(long s) {
|
String(long s) : String((long long)s) { }
|
||||||
String((long long)s);
|
|
||||||
}
|
|
||||||
|
|
||||||
String(long long s) {
|
String(long long s) {
|
||||||
length = 0;
|
length = 0;
|
||||||
body = new char[1];
|
body = new char[1];
|
||||||
body[0] = '\0';
|
body[0] = '\0';
|
||||||
if (s >= 0) {
|
if (s >= 0) {
|
||||||
long s_ = s;
|
long long s_ = s;
|
||||||
long size = 1;
|
long size = 1;
|
||||||
while (s_ >= 10) {
|
while (s_ >= 10) {
|
||||||
s_ = s_ / 10;
|
s_ = s_ / 10;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ protected:
|
|||||||
String workspace;
|
String workspace;
|
||||||
TaskState state;
|
TaskState state;
|
||||||
public:
|
public:
|
||||||
long start_time;
|
long long start_time;
|
||||||
String printState(){
|
String printState(){
|
||||||
switch(state){
|
switch(state){
|
||||||
case Inactive:
|
case Inactive:
|
||||||
@@ -152,8 +152,8 @@ public:
|
|||||||
}else if (Utils::Exists(workspace+"/INTERRUPT")){
|
}else if (Utils::Exists(workspace+"/INTERRUPT")){
|
||||||
state=AbortedByUser;
|
state=AbortedByUser;
|
||||||
} else {
|
} else {
|
||||||
long now = Utils::getAbsoluteTime();
|
long long now = Utils::getAbsoluteTime();
|
||||||
long delta = now-start_time;
|
long long delta = now-start_time;
|
||||||
if (maxtime<delta){
|
if (maxtime<delta){
|
||||||
state=AbortedByTimeout;
|
state=AbortedByTimeout;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user