diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-11-08 19:17:08 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-11-08 19:17:08 -0800 |
commit | 64aa954daec2f6f2df460f9bcc1e2ca6ba42b640 (patch) | |
tree | 1516488c97abdffcf10dcd9f5b9c38b5f6eb1cc6 /csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs | |
parent | 1e54dcfc707bc6ba23ac9a087336836f95d7fbd0 (diff) | |
parent | cff900e8f9e4b8f3a8f314f0f44eab222ebb870b (diff) | |
download | protobuf-64aa954daec2f6f2df460f9bcc1e2ca6ba42b640.tar.gz protobuf-64aa954daec2f6f2df460f9bcc1e2ca6ba42b640.tar.bz2 protobuf-64aa954daec2f6f2df460f9bcc1e2ca6ba42b640.zip |
Merge pull request #954 from jskeet/blank-lines-in-comments
Stop removing all blank lines in doc comments.
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs index 39251e2e..cc2dfd26 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs @@ -48,12 +48,16 @@ namespace Google.Protobuf.WellKnownTypes { /// or "month". It is related to Timestamp in that the difference between /// two Timestamp values is a Duration and it can be added or subtracted /// from a Timestamp. Range is approximately +-10,000 years. + /// /// Example 1: Compute Duration from two Timestamps in pseudo code. + /// /// Timestamp start = ...; /// Timestamp end = ...; /// Duration duration = ...; + /// /// duration.seconds = end.seconds - start.seconds; /// duration.nanos = end.nanos - start.nanos; + /// /// if (duration.seconds < 0 && duration.nanos > 0) { /// duration.seconds += 1; /// duration.nanos -= 1000000000; @@ -61,12 +65,16 @@ namespace Google.Protobuf.WellKnownTypes { /// duration.seconds -= 1; /// duration.nanos += 1000000000; /// } + /// /// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + /// /// Timestamp start = ...; /// Duration duration = ...; /// Timestamp end = ...; + /// /// end.seconds = start.seconds + duration.seconds; /// end.nanos = start.nanos + duration.nanos; + /// /// if (end.nanos < 0) { /// end.seconds -= 1; /// end.nanos += 1000000000; |