TimerObject.bas 543 B

12345678910111213141516171819202122232425262728293031
  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. valeur = 1000 * (Timer - t0)
  21. End Function
  22. Public Sub display()
  23. Debug.Print 1000 * (Timer - t0) & " ms."
  24. End Sub