• Home
  • API Documentation
  • API Documentation
  • TimeyWimey
  • NumberToTimespanExtensions
  • Seconds
Show / Hide Table of Contents
  • TimeyWimey
    • DateTimeExtensions
      • ChangeKind
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeOffsetExtensions
      • IsFuture
      • IsPast
      • TruncateToHours
      • TruncateToMinutes
      • TruncateToSeconds
    • DateTimeRange
      • CompareTo
      • Contains
      • Create
      • DateTimeRange
      • End
      • EndAt
      • Equality
      • Equals
      • GetHashCode
      • GreaterThan
      • Inequality
      • Length
      • LessThan
      • Overlaps
      • Start
      • StartAt
    • NumberToTimespanExtensions
      • Days
      • Hours
      • Milliseconds
      • Minutes
      • Seconds
    • TimeSpans
      • EightHours
      • EightMilliseconds
      • FifteenMilliseconds
      • FifteenMinutes
      • FifteenSeconds
      • FiveDays
      • FiveHours
      • FiveHundredMilliseconds
      • FiveMilliseconds
      • FiveMinutes
      • FiveSeconds
      • FortyFiveMinutes
      • FortyFiveSeconds
      • FourteenDays
      • NinetyDays
      • OneDay
      • OneHour
      • OneHundredAndTwentyDays
      • OneHundredMilliseconds
      • OneMillisecond
      • OneMinute
      • OneSecond
      • SevenDays
      • SixteenMilliseconds
      • SixtyDays
      • TenHours
      • TenMilliseconds
      • TenMinutes
      • TenSeconds
      • ThirtyDays
      • ThirtyMinutes
      • ThirtyOneDays
      • ThirtySeconds
      • ThreeDays
      • ThreeHours
      • ThreeHundredAndSixtyFiveDays
      • ThreeMinutes
      • ThreeSeconds
      • TwelveHours
      • TwentyFourHours
      • TwentyMilliseconds
      • TwentyMinutes
      • TwentySeconds
      • TwoDays
      • TwoHours
      • TwoHundredAndFiftyMilliseconds
      • TwoMinutes
      • TwoSeconds
    • UnixTime
      • ToDateTime
      • ToDateTimeOffset
      • ToUnixTimestamp
      • UnixEpoch
      • UnixEpochDateTimeOffset
  • TimeyWimey.Abstractions
    • CachingClock
      • CachingClock
      • Dispose
      • Now
    • ClockBase
      • Adjusted
      • Now
      • OnAdjusted
    • IClock
      • Adjusted
      • Now
    • MockClock
      • Now
      • SetTime
    • SystemClock
      • Now
  • TimeyWimey.Tests
    • NumberToTimespanExtensions
      • DoubleToDays_InitialisesTimeSpanCorrectly
      • DoubleToHours_InitialisesTimeSpanCorrectly
      • DoubleToMilliseconds_InitialisesTimeSpanCorrectly
      • DoubleToMinutes_InitialisesTimeSpanCorrectly
      • DoubleToSeconds_InitialisesTimeSpanCorrectly
      • FloatToDays_InitialisesTimeSpanCorrectly
      • FloatToHours_InitialisesTimeSpanCorrectly
      • FloatToMilliseconds_InitialisesTimeSpanCorrectly
      • FloatToMinutes_InitialisesTimeSpanCorrectly
      • FloatToSeconds_InitialisesTimeSpanCorrectly
      • IntegerToDays_InitialisesTimeSpanCorrectly
      • IntegerToHours_InitialisesTimeSpanCorrectly
      • IntegerToMilliseconds_InitialisesTimeSpanCorrectly
      • IntegerToMinutes_InitialisesTimeSpanCorrectly
      • IntegerToSeconds_InitialisesTimeSpanCorrectly
      • LongToDays_InitialisesTimeSpanCorrectly
      • LongToHours_InitialisesTimeSpanCorrectly
      • LongToMilliseconds_InitialisesTimeSpanCorrectly
      • LongToMinutes_InitialisesTimeSpanCorrectly
      • LongToSeconds_InitialisesTimeSpanCorrectly

Method Seconds

Seconds(Int32)

Returns a System.TimeSpan representing the specified number of seconds.

Declaration
public static TimeSpan Seconds(this int seconds)
Parameters
Type Name Description
System.Int32 seconds

The number of seconds in the time span.

Returns
Type Description
System.TimeSpan

A System.TimeSpan.

Seconds(Int64)

Returns a System.TimeSpan representing the specified number of seconds.

Declaration
public static TimeSpan Seconds(this long seconds)
Parameters
Type Name Description
System.Int64 seconds

The number of seconds in the time span.

Returns
Type Description
System.TimeSpan

A System.TimeSpan.

Seconds(Double)

Returns a System.TimeSpan representing the specified number of seconds.

Declaration
public static TimeSpan Seconds(this double seconds)
Parameters
Type Name Description
System.Double seconds

The number of seconds in the time span.

Returns
Type Description
System.TimeSpan

A System.TimeSpan.

Seconds(Single)

Returns a System.TimeSpan representing the specified number of seconds.

Declaration
public static TimeSpan Seconds(this float seconds)
Parameters
Type Name Description
System.Single seconds

The number of seconds in the time span.

Returns
Type Description
System.TimeSpan

A System.TimeSpan.

In This Article
  • Seconds(Int32)
  • Seconds(Int64)
  • Seconds(Double)
  • Seconds(Single)
Back to top Copyright (c) 2017 Troy Willmot