bench.pp 926 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. This file is part of the Free Pascal test suite.
  3. Copyright (c) 1999-2002 by the Free Pascal development team.
  4. This program makes the compilation and
  5. execution of individual test sources.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {$mode objfpc}
  13. unit bench;
  14. interface
  15. function GetMicroSTicks : int64;
  16. implementation
  17. uses
  18. sysutils;
  19. function GetMicroSTicks : int64;
  20. var
  21. h,m,s,s1000 : word;
  22. begin
  23. decodetime(time,h,m,s,s1000);
  24. result:=(int64(h)*3600000+int64(m)*60000+int64(s)*1000+int64(s1000))*1000;
  25. end;
  26. end.