TimerObject.bas 564 B

1234567891011121314151617181920212223242526272829303132
  1. Attribute VB_GlobalNameSpace = False
  2. Attribute VB_Creatable = False
  3. Attribute VB_PredeclaredId = False
  4. Attribute VB_Exposed = False
  5. Option Compare Database
  6. Option Explicit
  7. ' ** Access Toolbox Module **
  8. ' on 2017-02-28,
  9. ' @author: Olivier Massot
  10. ' V 1.0
  11. ' Timer Class Object
  12. Private t0 As Single
  13. Private Sub class_Initialize()
  14. t0 = Timer
  15. End Sub
  16. Public Sub start()
  17. t0 = Timer
  18. End Sub
  19. Public Function current() As Long
  20. Dim valeur As Long
  21. valeur = 1000 * (Timer - t0)
  22. End Function
  23. Public Sub display()
  24. Debug.Print 1000 * (Timer - t0) & " ms."
  25. End Sub