Converts a TimeSpan into an uint correctly representing a Time-To-Live,
that is expressed in seconds.
Durations strictly bigger than 30 days are converted to a unix-syle timestamp (seconds since the Epoch),
as described in the couchbase TTL documentation.
Namespace: Couchbase.UtilsAssembly: Couchbase.NetClient (in Couchbase.NetClient.dll) Version: 2.0.0.0 (2.0.0.0)

Parameters
- duration
- Type: System.TimeSpan
[Missing <param name="duration"/> documentation for "M:Couchbase.Utils.TimeSpanExtensions.ToTtl(System.TimeSpan)"]
Return Value
Type: UInt32The TTL, expressed as a suitable uint.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type TimeSpan. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).