Class TimeSpanExtensions
Inherited Members
Namespace: Couchbase.Utils
Assembly: Couchbase.NetClient.dll
Syntax
public static class TimeSpanExtensions
Methods
| Edit this page View SourceGetSeconds(TimeSpan)
Declaration
public static uint GetSeconds(this TimeSpan timeSpan)
Parameters
Type | Name | Description |
---|---|---|
Time |
timeSpan | The timespan. |
Returns
| Edit this page View SourceToTtl(TimeSpan)
Converts a Time
Declaration
public static uint ToTtl(this TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
Time |
duration |
Returns
Type | Description |
---|---|
uint | The TTL, expressed as a suitable uint. |
ToTtl(uint)
Converts a duration expressed as milliseconds to a unix-based TTL.
Declaration
public static uint ToTtl(this uint duration)
Parameters
Type | Name | Description |
---|---|---|
uint | duration | Milliseconds to use as TTL. |
Returns
Type | Description |
---|---|
uint | The TTL, expressed as a unix-based TTL in milliseconds. |