Guest User

Untitled

a guest
Apr 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. namespace com.example
  2.  
  3. struct Tick
  4. {
  5. 0: required uint64 epoch;
  6. }
  7.  
  8. enum Timezone
  9. {
  10. UTC,
  11. LOCAL = 1
  12. }
  13.  
  14. struct Timestamp : Tick
  15. {
  16. 0: string time;
  17. 1: Timezone timezone = LOCAL;
  18. 2: string tz_name;
  19. }
  20.  
  21. struct TimeQuery
  22. {
  23. 0: Timezone timezone = LOCAL;
  24. 1: string format = "MMM dd, yyyy H:mm:ss tt";
  25. }
  26.  
  27. service Clock
  28. {
  29. Timestamp get_now (TimeQuery);
  30. stream Tick on_tick ();
  31. stream Timestamp on_timestamp ();
  32. }
Add Comment
Please, Sign In to add comment