# BlockTimestamp
Creates a block timestamp object
Rarely used, typically in blockchain block headers
# Constructors
constructor( public slot: u32 = 0 )slot- Blocks since epoch
Example:
import { BlockTimestamp } from 'proton-tsc'
const bt = new BlockTimestamp(5)
// tp.slot == 5
static fromTimePoint(t: TimePoint): BlockTimestampCreates a BlockTimestamp object from a precise TimePoint
static fromTimePointSec(t: TimePointSec): BlockTimestampCreates a BlockTimestamp object from a precise TimePointSec
# Static Fields
static blockIntervalMs: i32 = 500;Represents interval between each block
static blockTimestampEpoch: i64 = 946684800000;Start of epoch
# Static Methods
static function maximum(): BlockTimestampReturns block timestamp of 0xffff (65535)
static function min(): BlockTimestampReturns block timestamp of 0
# Instance Methods
function next(): BlockTimestampReturns a new BlockTimestamp with slot incremented by 1
function toTimePoint(): TimePointConvert block timestamp to a TimePoint object
function setTimePoint(t: TimePoint): voidSets the slot field using a time point
function setTimePointSec(t: TimePointSec): voidSets the slot field using a time point sec
function toString(): stringReturns string representation of number of slots since epoch
# Static Equality methods
static function eq(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slots of the two block timestamps are equal
static function neq(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slots of the two block timestamps are not equal
static function lt(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slot of a is less than b
static function lte(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slot of a is less than or equal to b
static function gt(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slot of a is greater than b
static function gte(a: BlockTimestamp, b: BlockTimestamp): boolChecks that the slot of a is greater than or equal to b