本文整理汇总了C++中wxDateTime::SetMillisecond方法的典型用法代码示例。如果您正苦于以下问题:C++ wxDateTime::SetMillisecond方法的具体用法?C++ wxDateTime::SetMillisecond怎么用?C++ wxDateTime::SetMillisecond使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxDateTime
的用法示例。
在下文中一共展示了wxDateTime::SetMillisecond方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: eDocumentPath_shouldUpdateCygwin
//
// Returns true if this Cygwin installation should be updated (or installed for the first time.)
// Returns false if we are up-to-date.
//
bool eDocumentPath_shouldUpdateCygwin(wxDateTime &stampTime, const wxFileName &supportFile){
// E's support folder comes with a network installer for Cygwin.
// Newer versions of E may come with newer Cygwin versions.
// If the user already has Cygwin installed, we still check the
// bundled installer to see if it is newer; if so, then we need to
// re-install Cygwin at the newer version.
if (!stampTime.IsValid())
return true; // First time, so we need to update.
wxDateTime updateTime = supportFile.GetModificationTime();
// Windows doesn't store milliseconds; we clear out this part of the time.
updateTime.SetMillisecond(0);
updateTime.SetSecond(0);
stampTime.SetMillisecond(0);
stampTime.SetSecond(0);
// If the times are the same, no update needed.
if (updateTime == stampTime)
return false;
// ...else the dates differ and we need to update.
wxLogDebug(wxT("InitCygwin: Diff dates"));
wxLogDebug(wxT(" e-postinstall: %s"), updateTime.FormatTime());
wxLogDebug(wxT(" last-e-update: %s"), stampTime.FormatTime());
return true;
}