当前位置: 首页>>代码示例>>C++>>正文


C++ wxDateTime::SetMillisecond方法代码示例

本文整理汇总了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;
}
开发者ID:joeri,项目名称:e,代码行数:33,代码来源:eDocumentPath.cpp


注:本文中的wxDateTime::SetMillisecond方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。