How to convert a Ada.Real_TIme.Time to a string?
问题 I would like to write a Ada.Real_Time.Time in a file, How can I do that? Thanks 回答1: Package Ada.Real_time doesn't provide a method for the direct format. I'd advise you to look at Ada.Calendar.Formatting. You have a method Clock like in Ada.Real_time. Indeed, there is a method Image(parameters : Time), which returns a String. For more details : Package: Ada.Calendar.Formatting 回答2: You can use Ada.Real_Time.Split to convert an Ada.Real_Time.Time into (a) the number of seconds since the epoch