timer.txt
来自「计算时间间隔的程序」· 文本 代码 · 共 24 行
TXT
24 行
From: nuthing@mcl.ucsb.edu (Ethan Rohrer)
Newsgroups: rec.games.programmer
Subject: TIMING SOURCE CODE HERE!
Date: 14 Dec 1994 05:55:34 GMT
Ok, here is some code I wrote a while ago, and touched up a little
recently as someone else needed it. As you may have noticed by the
line count, it is VERY wordy...hopefully some of it is useful.
This code returns a time value in units of 838 nanoseconds,
and I have found it quite useful. Even though the examples I
provide are for fixed-frame-rate games, I have used this in
a crude ray-casting (yuk) demo I wrote a while back which will
run as fast as your CPU (or monitor/video) will allow.
Lemme know if you create something cool with it!
Ethan -- rer@wlv.iipo.gtegsc.com
(following are timer.c and timer.h)
SNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIPSNIP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?