feisty meow concerns codebase  2.140
mdate.cpp
Go to the documentation of this file.
1 /*****************************************************************************\
2 * *
3 * Name : mdate *
4 * Author : Chris Koeritz *
5 * *
6 * Purpose: *
7 * *
8 * Provides a more informative date command, providing milliseconds also. *
9 * *
10 *******************************************************************************
11 * Copyright (c) 2002-$now By Author. This program is free software; you can *
12 * redistribute it and/or modify it under the terms of the GNU General Public *
13 * License as published by the Free Software Foundation; either version 2 of *
14 * the License or (at your option) any later version. This is online at: *
15 * http://www.fsf.org/copyleft/gpl.html *
16 * Please send any updates to: fred@gruntose.com *
17 \*****************************************************************************/
18 
19 #include <basis/astring.h>
21 #include <loggers/console_logger.h>
22 #include <timely/time_stamp.h>
24 
25 #include <math.h>
26 
27 using namespace application;
28 using namespace basis;
29 using namespace loggers;
30 using namespace structures;
31 using namespace timely;
32 
33 class mdate_app : public application_shell
34 {
35 public:
36  virtual int execute() {
38  program_wide_logger::get().log(time_stamp::notarize(false), ALWAYS_PRINT);
39  return 0;
40  }
41  DEFINE_CLASS_NAME("mdate_app");
42 };
43 
44 HOOPLE_MAIN(mdate_app, )
45 
The application_shell is a base object for console programs.
#define SETUP_CONSOLE_LOGGER
< a macro that retasks the program-wide logger as a console_logger.
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
Definition: enhance_cpp.h:45
Provides macros that implement the 'main' program of an application.
#define HOOPLE_MAIN(obj_name, obj_args)
options that should work for most unix and linux apps.
Definition: hoople_main.h:61
Implements an application lock to ensure only one is running at once.
The guards collection helps in testing preconditions and reporting errors.
Definition: array.h:30
A logger that sends to the console screen using the standard output device.
A dynamic container class that holds any kind of object via pointers.
Definition: amorph.h:55
#include <time.h>
Definition: earth_time.cpp:37