/tutorial/time/example6.e

http://github.com/tybor/Liberty · Specman e · 27 lines · 20 code · 4 blank · 3 comment · 0 complexity · 2f83ccd8af18e423ab22831dc970c599 MD5 · raw file

  1. class EXAMPLE6
  2. --
  3. -- Using BASIC_TIME with the FILE_TOOLS class.
  4. --
  5. create {ANY}
  6. make
  7. feature {}
  8. make
  9. local
  10. time: TIME; time_in_english: TIME_IN_ENGLISH
  11. do
  12. io.put_string("Last modification of file %"example6.e%":%N")
  13. time := file_tools.last_change_of("example6.e")
  14. create time_in_english
  15. time_in_english.set_time(time)
  16. io.put_string(time_in_english.to_string)
  17. io.put_string("%N")
  18. end
  19. file_tools: FILE_TOOLS
  20. once
  21. create Result
  22. end
  23. end -- class EXAMPLE6