;---- 0 - BEGIN
;
;************************************************************************
;Titre      : sleep.pb
;Auteur     : (C) 2017 CAGE
;Date       : 2017/09/21
;Version PB : PureBasic 5.61 (Windows - x86)
;Version PB : PureBasic 5.61 (Windows - x64)
;Compiler Options
;Compiler Options : Executable format: Console
;Compile/Run      : Create temporary executable in the source directory
;
;Libairies: aucunes
;
;************************************************************************
;

EnableExplicit  ; all the variables must be declared

OnErrorGoto(?ErrorHandler)

Define count = CountProgramParameters()

Define info.s, myparam.s

Define result, seconds

Define rcode = #False

#myhome = "pbcage.free.fr"

If count
  myparam = ProgramParameter(0)
  seconds = Val(myparam)
  For count = 1 To seconds
    Delay(1000)
  Next
  rcode = #True
Else
  OpenConsole()
    PrintN(#Null$)
    PrintN("Arguments are: Sleep <seconds>")
    PrintN(#Null$)
    PrintN(#myhome)
  CloseConsole()
  rcode = #False
EndIf

ErrorHandler:

End rcode

; IDE Options = PureBasic 5.61 (Windows - x64)
; CursorPosition = 16
; EnableXP
; Executable = mypviewer.exe
; CompileSourceDirectory
; EnableUnicode