<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/games/grdc/grdc.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2015-10-02T10:08:11Z</updated>
<entry>
<title>Final step of eliminating the "games" distribution: Merge src/games</title>
<updated>2015-10-02T10:08:11Z</updated>
<author>
<name>Colin Percival</name>
<email>cperciva@FreeBSD.org</email>
</author>
<published>2015-10-02T10:08:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6ae1554a5d9b318f8ad53ccc39fa5a961403da73'/>
<id>urn:sha1:6ae1554a5d9b318f8ad53ccc39fa5a961403da73</id>
<content type='text'>
(or what's left of it, at least) into src/usr.bin.

This change will not be MFCed.

Discussed at:   EuroBSDCon 2014
Committed from: EuroBSDCon 2015
</content>
</entry>
<entry>
<title>Correct grdc(1) 12-hour display between 12:00 and 13:00</title>
<updated>2015-06-02T20:53:17Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2015-06-02T20:53:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=37be506339c3c90ec2045ef5009659cbdff84127'/>
<id>urn:sha1:37be506339c3c90ec2045ef5009659cbdff84127</id>
<content type='text'>
PM starts at 12:00, not 13:00.

PR:		194291, 200133
Submitted by:	Nick Price
MFC after:	1 week
</content>
</entry>
<entry>
<title>Add static keywords to variables and functions where possible in games/.</title>
<updated>2011-11-05T07:18:53Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2011-11-05T07:18:53Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3b9fe1e175fe34e0c58028a8983de364a191d934'/>
<id>urn:sha1:3b9fe1e175fe34e0c58028a8983de364a191d934</id>
<content type='text'>
This allows us to detect unused functions and variables and allows the
compiler to do a better job at optimisation.
</content>
</entry>
<entry>
<title>grdc(6): de-obfuscate the timekeeping of now/delay</title>
<updated>2010-08-03T20:56:23Z</updated>
<author>
<name>Ulrich Spörlein</name>
<email>uqs@FreeBSD.org</email>
</author>
<published>2010-08-03T20:56:23Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=ec2368eb9252e7c9785cf9c25ee9d6d0d16c44ea'/>
<id>urn:sha1:ec2368eb9252e7c9785cf9c25ee9d6d0d16c44ea</id>
<content type='text'>
- 'now' only contains current time readings
- delay is only used as parameter to nanosleep
- prev_sec contains the time_t of the previous loop iteration

Submitted by:	bde
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>grdc(6): Partial backout of r210755</title>
<updated>2010-08-03T16:02:57Z</updated>
<author>
<name>Ulrich Spörlein</name>
<email>uqs@FreeBSD.org</email>
</author>
<published>2010-08-03T16:02:57Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1c9d5fc21bd1e779c89c1388723b89fefea7a90f'/>
<id>urn:sha1:1c9d5fc21bd1e779c89c1388723b89fefea7a90f</id>
<content type='text'>
The previous revision was flawed in numerous ways:
- the if condition would depend on garbage stack values
- grdc(6) would loop n times, not n seconds. This only makes
  a difference if it takes more than 1 second to recalculate/redraw
  the display.
- style(9) violations

The following change adds argument checking and tracks the elapsed time
between loops explicitly and will exit after roughly n seconds.

While here sort headers and remove bogus #ifndef

Submitted by:	bde
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>grdc(6): fix timekeeping for user-supplied value n</title>
<updated>2010-08-02T12:15:22Z</updated>
<author>
<name>Ulrich Spörlein</name>
<email>uqs@FreeBSD.org</email>
</author>
<published>2010-08-02T12:15:22Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=de1070d4d8ff119f423384dc2812b1e1cc15a8a2'/>
<id>urn:sha1:de1070d4d8ff119f423384dc2812b1e1cc15a8a2</id>
<content type='text'>
- Keep timespec 'now' and 'delay' separate to avoid confusion
- Increase user-supplied n to run _at least_ n seconds, not max n

PR:            bin/149130 (based on)
Submitted by:  Andy Farkas
MFC after:     2 weeks
</content>
</entry>
<entry>
<title>grdc(6) make WARNS=6 clean and bump accordingly</title>
<updated>2010-02-15T14:30:37Z</updated>
<author>
<name>Ulrich Spörlein</name>
<email>uqs@FreeBSD.org</email>
</author>
<published>2010-02-15T14:30:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=72cb6052bd1baf9ad2efcd46d3df31874942ced6'/>
<id>urn:sha1:72cb6052bd1baf9ad2efcd46d3df31874942ced6</id>
<content type='text'>
Approved by:		ed (Co-mentor)
</content>
</entry>
<entry>
<title>Improve time precision for grdc(6):</title>
<updated>2010-02-10T18:20:20Z</updated>
<author>
<name>Xin LI</name>
<email>delphij@FreeBSD.org</email>
</author>
<published>2010-02-10T18:20:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eb1930d3f2f9c7c53e29df8a34dcfd98fd2b803a'/>
<id>urn:sha1:eb1930d3f2f9c7c53e29df8a34dcfd98fd2b803a</id>
<content type='text'>
Traditionally, grdc would obtain time through time(3) which in turn gets
only the second part of clock (CLOCK_SECOND), and sleep for 1 second after
each screen refresh.

This approach would have two problems.  First, we are not guaranteed to
be waken up at the beginning of a whole second, which will typically
exhibit as a "lag" on second number.  Second, because we sleep for whole
second, and the refresh process would take some time, the error would
accumulate from time to time, making the lag variable.

Make grdc(6) to use time(3) to get time only at the beginning, and sample
time in CLOCK_REALTIME_FAST granularity after refreshing, and use the
nanosecond part to caculate how much time we want to sleep.

PR:		bin/120813
MFC after:	1 month
</content>
</entry>
<entry>
<title>Handle 12-hour clocks properly: when the time is 00:00-00:59, adjust the</title>
<updated>2003-06-23T16:01:11Z</updated>
<author>
<name>Will Andrews</name>
<email>will@FreeBSD.org</email>
</author>
<published>2003-06-23T16:01:11Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=17527010e2e3496000a26c0b1ee157a31146e625'/>
<id>urn:sha1:17527010e2e3496000a26c0b1ee157a31146e625</id>
<content type='text'>
hour to 12 so the time reads "12:00-12:59 AM".
</content>
</entry>
<entry>
<title>Add an option to print the time in 12-hour format.</title>
<updated>2003-03-28T16:37:45Z</updated>
<author>
<name>Maxime Henrion</name>
<email>mux@FreeBSD.org</email>
</author>
<published>2003-03-28T16:37:45Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=37087753b2126a720a6c7b8c59652b73b70aa3be'/>
<id>urn:sha1:37087753b2126a720a6c7b8c59652b73b70aa3be</id>
<content type='text'>
Submitted by:	Samy Al Bahra &lt;samy@kerneled.com&gt;
</content>
</entry>
</feed>
