CurrentSecond
Result = CurrentSecond()
 
Parameters: NONE
Returns:

    Result = The current second
 

CurrentSecond returns the current second as an integer between 0 and 59.




Mini Tutorial:


Showing the use of the functions CurrentHour, CurrentMinute and CurrentSecond


  
; Start of Repeat/Until loop
  Repeat
     
   ; Clear the screen
     Cls RGB(0,0,0)
     
   ; put hour, minute and second to string variables
     h$ = Str$(CurrentHour())
     m$ = Str$(CurrentMinute())
     s$ = Str$(CurrentSecond())
     
   ; pad leading zeros
     If Len(h$) = 1 Then h$ = "0" + h$
     If Len(m$) = 1 Then m$ = "0" + m$
     If Len(s$) = 1 Then s$ = "0" + s$
     
   ; display the time
     Print h$ + ":" + m$ + ":" + s$
     
   ; Display the screen
     Sync
     
   ; repeat until the ESC key is pressed
  Until EscKey()=true
  
; End Program
  End
  
  




This example would output something like this.

  
  02:24:40
  
  




 
Related Info: CurrentDate$ | CurrentDay$ | CurrentHour | CurrentMinute | CurrentMonth$ | CurrentTime$ | CurrentYear$ | Timer :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com