2014-05-16 18:51:01 +08:00
|
|
|
//===-- MIUtilDateTimeStd.h -------------------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-08-09 00:47:42 +08:00
|
|
|
// Third party headers
|
|
|
|
#include <ctime>
|
2014-05-16 18:51:01 +08:00
|
|
|
|
|
|
|
// In-house headers:
|
2014-11-18 02:06:21 +08:00
|
|
|
#include "MIUtilString.h"
|
2014-05-16 18:51:01 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
//++
|
|
|
|
//============================================================================
|
2014-11-18 02:06:21 +08:00
|
|
|
// Details: MI common code utility class. Used to retrieve system local date
|
|
|
|
// time.
|
2014-05-16 18:51:01 +08:00
|
|
|
//--
|
2016-09-07 04:57:50 +08:00
|
|
|
class CMIUtilDateTimeStd {
|
|
|
|
// Methods:
|
|
|
|
public:
|
|
|
|
/* ctor */ CMIUtilDateTimeStd();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
CMIUtilString GetDate();
|
|
|
|
CMIUtilString GetTime();
|
|
|
|
CMIUtilString GetDateTimeLogFilename();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
// Overrideable:
|
|
|
|
public:
|
|
|
|
// From CMICmnBase
|
|
|
|
/* dtor */ virtual ~CMIUtilDateTimeStd();
|
2014-11-18 02:06:21 +08:00
|
|
|
|
2016-09-07 04:57:50 +08:00
|
|
|
// Attributes:
|
|
|
|
private:
|
|
|
|
std::time_t m_rawTime;
|
|
|
|
char m_pScratch[16];
|
2014-05-16 18:51:01 +08:00
|
|
|
};
|