bringing in testkit tools
[feisty_meow.git] / nucleus / tools / simple_utilities / sleep_ms.cpp
1 /*****************************************************************************\
2 *                                                                             *
3 *  Name   : sleep_ms                                                          *
4 *  Author : Chris Koeritz                                                     *
5 *                                                                             *
6 *  Purpose:                                                                   *
7 *                                                                             *
8 *    Takes a number from the command line and sleeps for that many milli-     *
9 *  seconds.                                                                   *
10 *                                                                             *
11 *******************************************************************************
12 * Copyright (c) 2001-$now By Author.  This program is free software; you can  *
13 * redistribute it and/or modify it under the terms of the GNU General Public  *
14 * License as published by the Free Software Foundation; either version 2 of   *
15 * the License or (at your option) any later version.  This is online at:      *
16 *     http://www.fsf.org/copyleft/gpl.html                                    *
17 * Please send any updates to: fred@gruntose.com                               *
18 \*****************************************************************************/
19
20 #include <application/command_line.h>
21 #include <application/windoze_helper.h>
22 #include <basis/definitions.h>
23 #include <timely/time_control.h>
24
25 #include <stdio.h>
26
27 using namespace application;
28 using namespace basis;
29 using namespace timely;
30
31 DEFINE_ARGC_AND_ARGV;
32 ///DEFINE_INSTANCE_HANDLE;
33
34 int main(int argc, char *argv[])
35 {
36   if (argc < 2) {
37     printf("%s usage:\nThe first parameter is taken as the number of "
38         "milliseconds to sleep.\n", argv[0]);
39     return 1;
40   }
41   
42   int snooze_ms;
43   sscanf(argv[1], "%d", &snooze_ms);
44   time_control::sleep_ms(snooze_ms);
45   return 0;
46 }
47
48 #ifdef __BUILD_STATIC_APPLICATION__
49   // static dependencies found by buildor_gen_deps.sh:
50   #include <application/command_line.cpp>
51   #include <application/windoze_helper.cpp>
52   #include <basis/astring.cpp>
53   #include <basis/common_outcomes.cpp>
54   #include <basis/environment.cpp>
55   #include <basis/guards.cpp>
56   #include <basis/mutex.cpp>
57   #include <basis/utf_conversion.cpp>
58   #include <configuration/application_configuration.cpp>
59   #include <configuration/configurator.cpp>
60   #include <configuration/ini_configurator.cpp>
61   #include <configuration/ini_parser.cpp>
62   #include <configuration/table_configurator.cpp>
63   #include <configuration/variable_tokenizer.cpp>
64   #include <filesystem/byte_filer.cpp>
65   #include <filesystem/directory.cpp>
66   #include <filesystem/filename.cpp>
67   #include <loggers/console_logger.cpp>
68   #include <loggers/program_wide_logger.cpp>
69   #include <structures/checksums.cpp>
70   #include <structures/object_packers.cpp>
71   #include <structures/static_memory_gremlin.cpp>
72   #include <structures/string_hasher.cpp>
73   #include <structures/string_table.cpp>
74   #include <structures/version_record.cpp>
75   #include <textual/parser_bits.cpp>
76   #include <timely/earth_time.cpp>
77   #include <timely/time_control.cpp>
78   #include <timely/time_stamp.cpp>
79 #endif // __BUILD_STATIC_APPLICATION__
80