00001 /*****************************************************************************\ 00002 * * 00003 * Name : sleep_ms * 00004 * Author : Chris Koeritz * 00005 * * 00006 * Purpose: * 00007 * * 00008 * Takes a number from the command line and sleeps for that many milli- * 00009 * seconds. * 00010 * * 00011 ******************************************************************************* 00012 * Copyright (c) 2001-$now By Author. This program is free software; you can * 00013 * redistribute it and/or modify it under the terms of the GNU General Public * 00014 * License as published by the Free Software Foundation; either version 2 of * 00015 * the License or (at your option) any later version. This is online at: * 00016 * http://www.fsf.org/copyleft/gpl.html * 00017 * Please send any updates to: fred@gruntose.com * 00018 \*****************************************************************************/ 00019 00020 #include <basis/definitions.h> 00021 #include <basis/portable.h> 00022 #include <basis/utility.h> 00023 00024 #include <stdio.h> 00025 00026 DEFINE_ARGC_AND_ARGV; 00027 00028 int main(int argc, char *argv[]) 00029 { 00030 if (argc < 2) { 00031 printf("%s usage:\nThe first parameter is taken as the number of " 00032 "milliseconds to sleep.\n", argv[0]); 00033 return 1; 00034 } 00035 00036 int snooze_ms; 00037 sscanf(argv[1], "%d", &snooze_ms); 00038 portable::sleep_ms(snooze_ms); 00039 return 0; 00040 } 00041 00042 00043 #ifdef __BUILD_STATIC_APPLICATION__ 00044 #include <basis/array.cpp> 00045 #include <basis/byte_array.cpp> 00046 #include <basis/callstack_tracker.cpp> 00047 #include <basis/chaos.cpp> 00048 #include <basis/convert_utf.cpp> 00049 #include <basis/definitions.cpp> 00050 #include <basis/earth_time.cpp> 00051 #include <basis/guards.cpp> 00052 #include <basis/istring.cpp> 00053 #include <basis/log_base.cpp> 00054 #include <basis/memory_checker.cpp> 00055 #include <basis/mutex.cpp> 00056 #include <basis/object_base.cpp> 00057 #include <basis/outcome.cpp> 00058 #include <basis/packable.cpp> 00059 #include <basis/portable.cpp> 00060 #include <basis/sequence.cpp> 00061 #include <basis/set.cpp> 00062 #include <basis/utility.cpp> 00063 #include <basis/version_record.cpp> 00064 #include <data_struct/amorph.cpp> 00065 #include <data_struct/bit_vector.cpp> 00066 #include <data_struct/byte_hasher.cpp> 00067 #include <data_struct/common_templates.cpp> 00068 #include <data_struct/configurator.cpp> 00069 #include <data_struct/deep_array.cpp> 00070 #include <data_struct/hash_table.cpp> 00071 #include <data_struct/int_hash.cpp> 00072 #include <data_struct/matrix.cpp> 00073 #include <data_struct/pointer_hash.cpp> 00074 #include <data_struct/stack.cpp> 00075 #include <data_struct/static_memory_gremlin.cpp> 00076 #include <data_struct/string_hash.cpp> 00077 #include <data_struct/string_hasher.cpp> 00078 #include <data_struct/string_table.cpp> 00079 #include <data_struct/symbol_table.cpp> 00080 #include <data_struct/table_configurator.cpp> 00081 #include <opsystem/byte_filer.cpp> 00082 #include <opsystem/command_line.cpp> 00083 #include <opsystem/console_logger.cpp> 00084 #include <opsystem/critical_events.cpp> 00085 #include <opsystem/directory.cpp> 00086 #include <opsystem/file_logger.cpp> 00087 #include <opsystem/filename.cpp> 00088 #include <opsystem/ini_config.cpp> 00089 #include <opsystem/ini_parser.cpp> 00090 #include <opsystem/locked_logger.cpp> 00091 #include <opsystem/null_logger.cpp> 00092 #include <opsystem/path_configuration.cpp> 00093 #include <opsystem/rendezvous.cpp> 00094 #include <opsystem/startup_code.cpp> 00095 #include <opsystem/system_values.cpp> 00096 #include <textual/byte_format.cpp> 00097 #include <textual/list_parsing.cpp> 00098 #include <textual/parser_bits.cpp> 00099 #include <textual/string_manipulation.cpp> 00100 #include <textual/tokenizer.cpp> 00101 #endif // __BUILD_STATIC_APPLICATION__ 00102
1.5.1