proto_docs/google/protobuf/timestamp.rb in google-cloud-iot-v1-0.1.4 vs proto_docs/google/protobuf/timestamp.rb in google-cloud-iot-v1-0.2.0

- old
+ new

@@ -68,10 +68,19 @@ # # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) # .setNanos((int) ((millis % 1000) * 1000000)).build(); # # - # Example 5: Compute Timestamp from current time in Python. + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # + # Example 6: Compute Timestamp from current time in Python. # # timestamp = Timestamp() # timestamp.GetCurrentTime() # # # JSON Mapping