add_executable(flatifier flatifier.c)
add_executable(evaluate_parse_time Evaluate_parse_time.c)
add_executable(evaluate_get_route_time Evaluate_get_route_time.c)
+add_executable(basic_tracing basic_tracing.c)
### Add definitions for compile
if(NOT WIN32)
target_link_libraries(basic_parsing_test simgrid m)
target_link_libraries(is_router_test simgrid m)
target_link_libraries(flatifier simgrid m)
+target_link_libraries(basic_tracing simgrid m)
else(NOT WIN32)
target_link_libraries(evaluate_parse_time simgrid)
target_link_libraries(evaluate_get_route_time simgrid)
target_link_libraries(basic_parsing_test simgrid)
target_link_libraries(is_router_test simgrid)
target_link_libraries(flatifier simgrid)
+target_link_libraries(basic_tracing simgrid)
endif(NOT WIN32)
\ No newline at end of file
--- /dev/null
+/* Copyright (c) 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "msg/msg.h"
+#include "surf/surf_private.h"
+
+int host(int argc, char *argv[]);
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(basic_tracing,"Messages specific for this example");
+
+int host(int argc, char *argv[])
+{
+ XBT_INFO("Sleep for 1s");
+ MSG_process_sleep(1);
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ int res;
+ MSG_global_init(&argc, argv);
+ MSG_create_environment(argv[1]);
+ MSG_function_register("host", host);
+ MSG_process_create( "host", host, NULL, MSG_get_host_table()[0] );
+
+ res = MSG_main();
+ XBT_INFO("Simulation time %g", MSG_get_clock());
+ MSG_clean();
+ if (res == MSG_OK)
+ return 0;
+ else
+ return 1;
+}