04-02-2008
Quote:
Originally Posted by
krishmaths
Looks like a homework problem.
Have you tried date, though?
It is a homework problem
. The thing is we only started learning UNIX this semester, and i really have trouble learning it. Could you please send me the source code for the problem? i'm really need this done by tomorow
... Thanks in advance!
Alex.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Anyone ever write a unix clock program that display the clock out in 7 segment LCD style.
I tried doing one with case statements:
!/usr/bin/ksh
clock=`date`
case $clock in
#This prints out the number 0
0)
echo " -"
echo "| |"
echo
echo "| |"
echo " -"
;;
... (4 Replies)
Discussion started by: Astudent
4 Replies
2. UNIX for Dummies Questions & Answers
Hey ppl, i was wonddering, in mandrake, how to get the clok to display the time in non-military format....hehe thank you im just tired of looking at 18:00 hehe thank you (2 Replies)
Discussion started by: LolapaloL
2 Replies
3. Programming
Hey all,
i need a program to get the CPU ticks at certain points of my program. So, i thought about using the clock function, but i'm having a hard time figuring out how it really works. I wrote this simple program to try to understand it but it made me feel more confused:
#include <stdio.h>... (5 Replies)
Discussion started by: kastrup_carioca
5 Replies
4. UNIX for Dummies Questions & Answers
hi all...
how i can sincronization clock solaris server with windows server....both servers i connected in the same network...
thank you....
Best Regards... (4 Replies)
Discussion started by: chanfle
4 Replies
5. UNIX for Advanced & Expert Users
Hi
We had a AIX box built last year but was set to the correct GMT time, but using DST time zone. In march this year the clocks went forward without issues. (if I remember a couple of weeks early due to the DST zone)
This year we decided to change the clock to the correct time zone before... (0 Replies)
Discussion started by: markab2
0 Replies
6. Solaris
Hi there!!!
Need your help in solving some tricky problems.
Since clock() as such is buggy on SUN OS 5 we have started using gettimeofday() in our RTOS applications based on Solaris 9.
The problems we actually encountered previously were - the applications kind of freeze/hang eternally on... (1 Reply)
Discussion started by: smanu
1 Replies
7. UNIX for Dummies Questions & Answers
hi can any one guide me on how to display real time of a clock in unix for every 60 seconds (2 Replies)
Discussion started by: ramnadh_babu
2 Replies
8. UNIX for Dummies Questions & Answers
Is it possible to display the clock (timing) on the screen all the time. (3 Replies)
Discussion started by: vino.paal
3 Replies
9. UNIX for Advanced & Expert Users
The book The Design of the Unix Operating System speaks of a clock or timer that is used in scheduling. The clock generates interrupts that update priority information for processes and preempt processes in a round-robin fashion. It's apparent that this "clock" is not the same thing as the CPU... (1 Reply)
Discussion started by: Ultrix
1 Replies
LEARN ABOUT DEBIAN
oclock
OCLOCK(1) General Commands Manual OCLOCK(1)
NAME
oclock - round X clock
SYNOPSIS
oclock [-option ... ]
DESCRIPTION
Oclock simply displays the current time on an analog display.
OPTIONS
-fg color
choose a different color for the both hands and the jewel of the clock
-bg color
choose a different color for the background.
-jewel color
choose a different color for the jewel on the clock.
-minute color
choose a different color for the minute hand of the clock.
-hour color
choose a different color for the hour hand of the clock.
-backing { WhenMapped Always NotUseful }
selects an appropriate level of backing store.
-geometry geometry
define the initial window geometry; see X(7).
-display display
specify the display to use; see X(7).
-bd color
choose a different color for the window border.
-bw width
choose a different width for the window border. As the Clock widget changes its border around quite a bit, this is most usefully
set to zero.
-shape causes the clock to use the Shape extension to create an oval window. This is the default unless the shapeWindow resource is set
to false.
-noshape
causes the clock to not reshape itself and ancestors to exactly fit the outline of the clock.
-transparent
causes the clock to consist only of the jewel, the hands, and the border.
COLORS
If you would like your clock to be viewable in color, include the following in the #ifdef COLOR section you read with xrdb:
*customization: -color
This will cause oclock to pick up the colors in the app-defaults color customization file: /usr/lib/X11/app-defaults/Clock-color. Below
are the default colors:
Clock*Background: grey
Clock*BorderColor: light blue
Clock*hour: yellow
Clock*jewel: yellow
Clock*minute: yellow
SEE ALSO
X(7), X Toolkit documentation
AUTHOR
Keith Packard, MIT X Consortium
X Version 11 oclock 1.0.3 OCLOCK(1)