-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <cstring>
#include "Batch_Job_PBS.hxx"
using namespace std;
} else if ( (*it).first == MAXWALLTIME ) {
char attr_value[32];
- long secondes = (*it).second;
- long heures = secondes / 3600L;
- long minutes = (secondes - 3600L * heures) / 60L;
- secondes = secondes % 60L;
- sprintf(attr_value, "%02ld:%02ld:%02ld", heures, minutes, secondes);
+ long minutes = (*it).second;
+ long heures = minutes / 60L;
+ minutes -= 60L * heures;
+ sprintf(attr_value, "%02ld:%02ld:00", heures, minutes);
setResourceAttributeOP(_p_attr_list, ATTR_l, "walltime", attr_value);