Sponsored Content
Full Discussion: Simple Chess Clock
Top Forums Programming Simple Chess Clock Post 302928065 by kristinu on Monday 8th of December 2014 04:28:22 PM
Old 12-08-2014
Simple Chess Clock

I am trying to implement a simple chess clock. It should have the following options: start, stop, reset, read.

Reset will set the time to zero
Start will start the clock
Stop will stop the clock

My problem is that I want that start continues counting
the time from the time it had when it was stopped.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

chess perl program questions

Hello guys, While going over the book, I ran into this chess program and I have few questions 1) on line 40), why is not $chessboard-> ) ??? 40 unless (defined $chessboard->) { 2) 20 foreach my $i (reverse (0..7)) { #Row 1 #!/usr/bin/perl -w 2 # 3 # 4 5 ... (1 Reply)
Discussion started by: hankooknara
1 Replies

2. Forum Support Area for Unregistered Users & Account Problems

Chess at the UNIX Forums.

Just to let you know, we have installed Chess at the UNIX forums: Chess Club - The UNIX Forums (0 Replies)
Discussion started by: Neo
0 Replies

3. UNIX for Dummies Questions & Answers

A Simple Clock, Well Maybe Not That Simple...

The attachment says it all really... It is a DEMO at a glance digital readout using the "date" command to make it useful... For a Mocbook Pro 13", OSX 10.7.5, but may well work on Linux variants too. Enjoy... #!/bin/bash # # Clock.sh # A bash DEMO to create a 6 x 7 character set... (4 Replies)
Discussion started by: wisecracker
4 Replies

4. What is on Your Mind?

Chess Players: Which Online Resources (and Software) Do You Use and Why?

Hi Chess Players, Which Online Resources (and Software) Do You Use and Why? As for me, I use chessgames.com and chessbase.com; but currently I'm using chessgames.com the most; I like exploring openings in the chessgames.com opening explorer. For analysis on the desktop (Mac) or iPhone I... (8 Replies)
Discussion started by: Neo
8 Replies

5. What is on Your Mind?

How to Play Chess in Facebook Messenger

Have you ever wondered to play chess while you chat with your friends? Facebook has made this possible. FB keeps coming up with more and more new ideas for its users but this time it is a more intellectual one. Facebook has built a build-in-functionality in Facebook messenger, in which you just... (0 Replies)
Discussion started by: Neo
0 Replies
CLOCK(3)						     Linux Programmer's Manual							  CLOCK(3)

NAME
clock - Determine processor time SYNOPSIS
#include <time.h> clock_t clock(void); DESCRIPTION
The clock() function returns an approximation of processor time used by the program. RETURN VALUE
The value returned is the CPU time used so far as a clock_t; to get the number of seconds used, divide by CLOCKS_PER_SEC. If the processor time used is not available or its value cannot be represented, the function returns the value (clock_t)-1. CONFORMING TO
ANSI C. POSIX requires that CLOCKS_PER_SEC equals 1000000 independent of the actual resolution. NOTES
The C standard allows for arbitrary values at the start of the program; subtract the value returned from a call to clock() at the start of the program to get maximum portability. Note that the time can wrap around. On a 32bit system where CLOCKS_PER_SEC equals 1000000 this function will return the same value approx- imately every 72 minutes. On several other implementations, the value returned by clock() also includes the times of any children whose status has been collected via wait() (or another wait-type call). Linux does not include the times of waited-for children in the value returned by clock(). The times() function, which explicitly returns (separate) information about the caller and its children, may be preferable. SEE ALSO
getrusage(2), times(2) GNU
2002-06-14 CLOCK(3)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy