Are your looking for this.
The following command will show the graphical clock
Code:
xclock
The following script will show the digital clock
Code:
tput clear #clear the screen
tput cup 14 #change the cursor position for columns wise.
while [ true ] #loop wil execute all times because the condition is always true.
do
echo -e "\r\t\t\t\t\t`date +"%T %P"`\c"
#\r used to cursor wait the same line. and
#\c is used to suppress the trailing new line.
done
Last edited by ungalnanban; 03-09-2010 at 02:08 AM..
I need to know where I can get real time stock market data "ticker" feed, in Unix, that can be captured for use in my data base.
If there is a subscriber service, that's good but, I really am looking for a software program that can interface with the Market in question, via modem and capture... (2 Replies)
What's the best way to run two OS's in real time??
I want to run Windows 2k professional and a flavor of UNIX in real time and flip between the two. I have vmware ver. 3.2 and Virtual PC 4.3.
I would preferably like to run Win2k with Solaris 8 (intel version) but I'll download Freebsd if... (1 Reply)
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
I have date time records in a PHP mysql table, I need a PHP travel clock which obviously counts down, I mean acts like a travel clock, but the clock time should be the date time field value down by the second, based on the full date time, from day to seconds
It is not just one record, I... (1 Reply)
# date +%s -d "Mon Feb 11 02:26:04"
1360567564
# perl -e 'print scalar localtime(1360567564), "\n";'
Mon Feb 11 02:26:04 2013
the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input
1359453135154
rather than 10 digit epoch time 1360567564... (3 Replies)
Hello All,
I have a Perl script I'm writing where I ask the user to enter a "start time" for something. The "$start_time" will be in the format of:
# The Time CLI Option Can be in the format of:
--start-time="1day"
--start-time="2hours"
--start-time="45min"
... (1 Reply)
I have read enough books and know about all the basic commands in unix. I have practiced the same in my home. Now i want to real time work like scheduling cron in a real time server, creating alerts, application status check using unix etc..,
I want to have a real time server acc to do this kind... (3 Replies)
Discussion started by: gk1227
3 Replies
LEARN ABOUT SUNOS
clock
clock(3C) Standard C Library Functions clock(3C)NAME
clock - report CPU time used
SYNOPSIS
#include <time.h>
clock_t clock(void);
DESCRIPTION
The clock() function returns the amount of CPU time (in microseconds) used since the first call to clock() in the calling process. The time
reported is the sum of the user and system times of the calling process and its terminated child processes for which it has executed the
wait(3C) function, the pclose(3C) function, or the system(3C) function.
RETURN VALUES
Dividing the value returned by clock() by the constant CLOCKS_PER_SEC, defined in the <time.h> header, will give the time in seconds. If
the process time used is not available or cannot be represented, clock returns the value (clock_t) -1.
USAGE
The value returned by clock() is defined in microseconds for compatibility with systems that have CPU clocks with much higher resolution.
Because of this, the value returned will wrap around after accumulating only 2147 seconds of CPU time (about 36 minutes).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO times(2), popen(3C), system(3C), wait(3C), attributes(5), standards(5)SunOS 5.10 24 Jul 2002 clock(3C)