timestamp.h

scratch/src/timestamp.h · 983 B

From the archive scratch.tgz

Download the archive   « Back to the archive contents

///////////////////////////////////////////////////////////
///////////////// Have an itch? Scratch it! ///////////////
///////////////////////// SCRATCH /////////////////////////
/////////////////////  A MUD  Server   ////////////////////
///////////////////// By: Jared Devall ////////////////////
/////////////////////      Thanks:     ////////////////////
/////////////////////  DIKU/Merc/ROM   ////////////////////
///////////////////// Aetas/Deus Gang  ////////////////////
/////////////////////       Beej       ////////////////////
///////////////////////////////////////////////////////////

#ifndef __TIMESTAMP_H_
#define __TIMESTAMP_H_

#include <time.h>
#include <string>


class Timestamp {
	public:
	Timestamp();
	std::string GetTime( void );
	std::string GetDateTime( void );
	static Timestamp &Instance();
};

// Our singleton instance
inline Timestamp &Timestamp::Instance() {
	static Timestamp instance;
	return instance;
}

#endif

Site Stats

Snippets: 1791
Codebases: 571