Skip Headers

Oracle® OLAP DML Reference
10g Release 1 (10.1)

Part Number B10339-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

DSECONDS

(Read-only) The DSECONDS option holds the number of seconds since January 1, 1970. The value of DSECONDS is in decimal (not integer form). In most cases, depending on your operating system, the decimal places after the second one have a value of zero because the measurement cannot be accurate at a more detailed level.

As an aid to enhancing a program's speed, DSECONDS can be used to determine how much time elapses while the program is running.

Data type

DECIMAL

Syntax

DSECONDS

Notes


Related Statements

For information about holding the number of seconds in integer form, see the SECONDS command. For information about programs, see the PROGRAM command.

Examples

Example 11-15 Timing a Program

The following program puts the value of DSECONDS at the start of the program in a variable called t1 and then displays the difference between t1 and the value of DSECONDS at the end of the program.

DEFINE prodsummary PROGRAM
PROGRAM
VARIABLE t1 DECIMAL
t1 = dseconds
LIMIT product TO ALL
BLANK
FOR product
DO
  ROW WIDTH 16 name.product ACROSS month Jun96: DECIMAL 0 LSET -
   '$'WIDTH 18 <RSET ' (Actual)' sales rset ' (Plan)' sales.plan>
DOEND
BLANK
ROW WIDTH 35 LSET 'The program took ' rset ' seconds.' -
 (dseconds - t1)
END

Running this program produces the following results.

3-Person Tents     $95,121 (actual)     $80,138 (plan)
Aluminum Canoes   $157,762 (actual)    $132,931 (plan)
Tennis Racquets    $97,174 (actual)     $84,758 (plan)
Warm-up Suits      $79,630 (actual)     $73,569 (plan)
Running Shoes     $153,688 (actual)    $109,219 (plan)
 
      The program took .20 seconds.