给分!!!在Microsoft(R) C/C++, Version 7.0中如何读取时间

flymancsdn 2003-08-25 11:16:31
请问在Microsoft(R) C/C++, Version 7.0中如何读取系统时间,要精确到1ms
能否用api的getlocaltime函数,能用的话,又如何用?不能的如何解决
...全文
38 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
zss6587 2003-08-28
  • 打赏
  • 举报
回复
谁说不可以的,我认为你根本就没查资料,而是只想得到答案。

QueryPerformanceFrequency
QueryPerformanceCounter

这两个函数可用(只要你的机器不是太老,应该可以),怎么用就不必多说了吧
flymancsdn 2003-08-28
  • 打赏
  • 举报
回复
QueryPerformanceFrequency
QueryPerformanceCounter

这两个函数可以定时用,但不能设置系统时间,我用过.
tomsx 2003-08-27
  • 打赏
  • 举报
回复
帮你UP一下。
yilaylay 2003-08-27
  • 打赏
  • 举报
回复
Windows系统最多精确到10ms,敲 cmd Enter ->time,可以看到只能设置系统时钟到10ms
bigdoors 2003-08-26
  • 打赏
  • 举报
回复
用Microsoft(R) C/C++, Version 7.0是开发dos程序吧,精确到1ms的时钟是没法直接获取的,只有自己通过编写IRQ 8 RealTime中断服务程序自己实现1ms级时钟
flymancsdn 2003-08-26
  • 打赏
  • 举报
回复
那SYSTEMTIME的结构体和函数GetSystemTime包含在哪个头文件中,要如何声明呢?请赐教!
ZHENG017 2003-08-26
  • 打赏
  • 举报
回复
可以用啊。不如用
SYSTEMTIME stSystemTime;
GetSystemTime(&stSystemTime);
char chTime[16];
sprintf("%d...",...)。
「已注销」 2003-08-26
  • 打赏
  • 举报
回复
可以啊,可以精确到lms(你的意思是小时,分,秒是吧)
misrosoft c/c++ 7.0有帮助文件的,你查看一下有关time的函数,就会知道。
相关文章《DOS的古董美》 MD DocUmEnT: 3/26/2016 10:26:57 AM by Jimbowhy 当计算机技术越来越先进,越来越快速更新,作为电子FANS,发现这样的现状不仅带给从事这个行业的人更多的便利,还有更多的迷失!而DOS就像是那个本应有活力的游乐园,收集资料的过程发现,国外确实把DOS当成了计算机世界的大游乐场!国内很多在玩开发板的的同学几乎都不懂得,其实个人电脑才是功能最齐全的“开花板”! - by Jimbowhy 为了混用汇编和C语言进行编程,就需要配套使用微软的C/C++语言编译器,也即是 Visual C++,它的前身是 Microsoft C/C++,最高版本好像是1992年的Microsoft(R) C/C++, Version 7.0,我手上就有MSC70.zip,还有1991年发布的MSC60.zip两个版本。更早的C语言开发工具就是1990年的QuickC(R) Compiler 2.51 Professional。然后就是Visual系列的天下了,最早的一版是1992年发行的Visual C++ 1.0,20张3.5英寸磁盘装,现在能看到的只有磁盘镜像了,镜像的Link.EX_是SZDD压缩格式。这个版本支持16位和32位开发,集成MFC框架,集成资源编辑器。链接程序为32位 Executable Linker 1.00,同时提供 link.exe 和 link32.exe 两个命令。在 Win PC World 上下载到一个称为 msvc10_32s.iso 的镜像,它包含了 Win32 和 NT两个套开发工具,标明是 Visual C++ 1.0,但感觉不是,像是一个未发布的版本。因为最后一个DOS开发版本是 Dec 5, 1994发行的 Visual C++ 1.52c,也就是从这一套工具开始,链接程序不再叫做 Executable Linker,而是叫做段模式程序链接器 Segmented Executable Linker,随CD发行的链接程序版本为 5.60.339,这个链接程序也是MASM32使用的16位程序链接器。直到今天,它仍然具有强大的生命力,一些为MSDOS、Windows 3.1编写16位应用程序的程序员还在使用这个版本,我个人也很喜欢这样小巧的开发工具,因为我只需库文件和编译工具而已,完成编码后剩下的工作就交给make工具而不是IDE。
Gimpel.Software.PC-lint.9.0a 新版本加入了对VS2005 VS2008 SourceInsight Eclipse的支持。真正的9.0版本,Enjoy it! -------------------------------------------------- --- Manual Additions/Modifications --- -------------------------------------------------- PC-lint for C/C++ Version 9.00a This readme.txt supplements the on-line PC-lint manual entitled "Reference Manual for PC-lint/Flexelint" found in the installation directory under the name "pc-lint.pdf" ------ Printing the Reference Manual ------ You have permission to print out the Reference Manual (or other related documentation) in whole or in part in support of the use of this software. ------ Support for Microsoft through Visual Studio 2008 ------ We currently support Microsoft Visual C/C++ 9.0 (as well as all earlier versions of the Microsoft compiler series). Support comes mainly from the compiler options files (co-...lnt). For example options files co-msc70.lnt, co-msc71.lnt, co-msc80.lnt and co-msc90.lnt support versions 7.0, 7.1, 8.0 and 9.0 respectively. ------ What's New ------ To find out what we've added to the product since Version 8.00, check out Chapter 20 "What's New" in the Reference Manual. ------ Front End ------ Your linting experience will be considerably enhanced by adapting your favorite editor or compiler environment to the task of sequencing from error to error. See Section 3.5 of the Reference Manual. ------ Multiple Passes ------ By default, PC-lint/FlexeLint will go through all your modules in one pass. For projects not previously linted there will be enough messages to look at. However, with just one pass, you will not be taking full advantage of our new static data tracking or the interfunction value tracking. With just one pass, we cannot say very much about static variables. We may see a variable being set to a value but we don't know of intervening functions that may be modifying the variable. We will also not know about dangerous return values for functions that are defined later than they are called, and we will not know about dangerous arguments for functions that are defined early. To introduce a second pass you need only to add the command line option: -passes(2) or, if this syntax presents a problem with your Shell, you may use: -passes[2] or, in some cases, -passes=2 is needed. Of course, you can replace the 2 with any number you wish. The larger the number, the more bugs that can be found and the more time that will be required. See Section 10.2 "Value Tracking" in the Reference Manual. Gimpel Software September, 2008

24,854

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧