1 /* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 //teshsuite/simdag/platforms/evaluate_parse_time ../examples/platforms/nancy.xml
11 #include "simdag/simdag.h"
12 #include "surf/surf_private.h"
15 #define BILLION 1000000000L;
16 extern routing_global_t global_routing;
18 int main(int argc, char **argv)
20 struct timespec start, stop;
23 /* initialisation of SD */
27 if( clock_gettime( CLOCK_REALTIME, &start) == -1 ) {
28 perror( "clock gettime" );
33 gettimeofday(&tv, NULL);
34 start.tv_sec = tv.tv_sec;
35 start.tv_nsec = tv.tv_usec*1000;
37 /* creation of the environment */
38 SD_create_environment(argv[1]);
41 if( clock_gettime( CLOCK_REALTIME, &stop) == -1 ) {
42 perror( "clock gettime" );
46 gettimeofday(&tv, NULL);
47 stop.tv_sec = tv.tv_sec;
48 stop.tv_nsec = tv.tv_usec*1000;
51 accum = ( stop.tv_sec - start.tv_sec )
52 + (double)( stop.tv_nsec - start.tv_nsec )
55 printf( "%lf\n", accum );