Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correction of the start application time setup.
[hpcvm.git] / src / and / hpcvm / Server.java
index 7c31580..390d580 100644 (file)
@@ -841,7 +841,7 @@ public class Server extends UnicastRemoteObject implements ServicesServer
                        {
                                app.setComputingClients( tmp ) ;
                                app.setRunning( true ) ;
-//                             app.setStartTime( System.currentTimeMillis() ) ;
+                               app.setStartTime( System.currentTimeMillis() ) ;
                                
                                int index, index2 ;
                                /* Choosing save neighbors */
@@ -1055,11 +1055,14 @@ public class Server extends UnicastRemoteObject implements ServicesServer
        public void goApplication()
        {
                synchronized( applications ) {
-               if( running && applications.get( ind ).getStartTime() != 0 )
-               {
-                       applications.get( ind ).setStartTime( System.currentTimeMillis() ) ;
-                       applications.get( ind ).setLastSaveDate( System.currentTimeMillis() ) ;
-               }}
+                       if( running && ! applications.get( ind ).getStartMark() )
+                       {
+                               System.out.println( "Application is starting." ) ;
+                               applications.get( ind ).setStartMark() ;
+                               applications.get( ind ).setStartTime( System.currentTimeMillis() ) ;
+                               applications.get( ind ).setLastSaveDate( System.currentTimeMillis() ) ;
+                       }
+               }
        }