first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / core / 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 <basis/astring.cpp>
52   #include <basis/common_outcomes.cpp>
53   #include <basis/environment.cpp>
54   #include <basis/mutex.cpp>
55   #include <basis/utf_conversion.cpp>
56   #include <configuration/application_configuration.cpp>
57   #include <configuration/configurator.cpp>
58   #include <configuration/ini_configurator.cpp>
59   #include <configuration/ini_parser.cpp>
60   #include <configuration/table_configurator.cpp>
61   #include <configuration/variable_tokenizer.cpp>
62   #include <filesystem/byte_filer.cpp>
63   #include <filesystem/directory.cpp>
64   #include <filesystem/filename.cpp>
65   #include <loggers/program_wide_logger.cpp>
66   #include <structures/checksums.cpp>
67   #include <structures/object_packers.cpp>
68   #include <structures/static_memory_gremlin.cpp>
69   #include <structures/string_hasher.cpp>
70   #include <structures/string_table.cpp>
71   #include <structures/version_record.cpp>
72   #include <textual/parser_bits.cpp>
73   #include <timely/earth_time.cpp>
74   #include <timely/time_control.cpp>
75   #include <timely/time_stamp.cpp>
76 #endif // __BUILD_STATIC_APPLICATION__
77