27 lines
716 B
C#
27 lines
716 B
C#
using System;
|
|
|
|
namespace Google.Protobuf.WellKnownTypes
|
|
{
|
|
// Token: 0x0200002C RID: 44
|
|
public static class TimeExtensions
|
|
{
|
|
// Token: 0x06000254 RID: 596 RVA: 0x0000A4C0 File Offset: 0x000086C0
|
|
public static Timestamp ToTimestamp(this DateTime dateTime)
|
|
{
|
|
return Timestamp.FromDateTime(dateTime);
|
|
}
|
|
|
|
// Token: 0x06000255 RID: 597 RVA: 0x0000A4C8 File Offset: 0x000086C8
|
|
public static Timestamp ToTimestamp(this DateTimeOffset dateTimeOffset)
|
|
{
|
|
return Timestamp.FromDateTimeOffset(dateTimeOffset);
|
|
}
|
|
|
|
// Token: 0x06000256 RID: 598 RVA: 0x0000A4D0 File Offset: 0x000086D0
|
|
public static Duration ToDuration(this TimeSpan timeSpan)
|
|
{
|
|
return Duration.FromTimeSpan(timeSpan);
|
|
}
|
|
}
|
|
}
|