aboutsummaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2016-10-10 13:58:39 -0700
committerGitHub <noreply@github.com>2016-10-10 13:58:39 -0700
commitfd046f6263fb17383cafdbb25c361e3451c31105 (patch)
tree5879fa426bd0cf22df5a7ee39d25b8ece7c117f8 /csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
parent337a028bb65ccca4dda768695950b5aba53ae2c9 (diff)
parentdaba6653f1289b58873c2ae993afcdb82035d2fb (diff)
downloadprotobuf-fd046f6263fb17383cafdbb25c361e3451c31105.tar.gz
protobuf-fd046f6263fb17383cafdbb25c361e3451c31105.tar.bz2
protobuf-fd046f6263fb17383cafdbb25c361e3451c31105.zip
Merge pull request #2234 from TeBoring/master
Merge 3.1.x branch into master.
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs')
-rw-r--r--csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
index 5d52330c..66ac7152 100644
--- a/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
+++ b/csharp/src/Google.Protobuf/WellKnownTypes/Duration.cs
@@ -25,7 +25,7 @@ namespace Google.Protobuf.WellKnownTypes {
"Ch5nb29nbGUvcHJvdG9idWYvZHVyYXRpb24ucHJvdG8SD2dvb2dsZS5wcm90",
"b2J1ZiIqCghEdXJhdGlvbhIPCgdzZWNvbmRzGAEgASgDEg0KBW5hbm9zGAIg",
"ASgFQnwKE2NvbS5nb29nbGUucHJvdG9idWZCDUR1cmF0aW9uUHJvdG9QAVoq",
- "Z2l0aHViLmNvbS9nb2xhbmcvcHJvdG9idWYvcHR5cGVzL2R1cmF0aW9uoAEB",
+ "Z2l0aHViLmNvbS9nb2xhbmcvcHJvdG9idWYvcHR5cGVzL2R1cmF0aW9u+AEB",
"ogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93blR5cGVzYgZwcm90",
"bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
@@ -79,6 +79,12 @@ namespace Google.Protobuf.WellKnownTypes {
/// end.seconds += 1;
/// end.nanos -= 1000000000;
/// }
+ ///
+ /// Example 3: Compute Duration from datetime.timedelta in Python.
+ ///
+ /// td = datetime.timedelta(days=3, minutes=10)
+ /// duration = Duration()
+ /// duration.FromTimedelta(td)
/// </summary>
public sealed partial class Duration : pb::IMessage<Duration> {
private static readonly pb::MessageParser<Duration> _parser = new pb::MessageParser<Duration>(() => new Duration());