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>
22#include <timely/time_stamp.h>
24
25#include <math.h>
26
27using namespace application;
28using namespace basis;
29using namespace loggers;
30using namespace structures;
31using namespace timely;
32
33class mdate_app : public application_shell
34{
35public:
36 virtual int execute() {
39 return 0;
40 }
41 DEFINE_CLASS_NAME("mdate_app");
42};
43
44HOOPLE_MAIN(mdate_app, )
45
The application_shell is a base object for console programs.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
virtual outcome log(const base_string &info, int filter)=0
writes the information in "info" to the logger using the "filter".
static loggers::standard_log_base & get()
Provided by the startup code within each application for logging.
static basis::astring notarize(bool add_space=true)
a useful method for getting a textual version of the time "right now".
#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:42
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>