[#GetBlockProofEquivalentTime]
= GetBlockProofEquivalentTime
:mrdocs:

Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds&period;

== Synopsis

Declared in `&lt;chain&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int64&lowbar;t
GetBlockProofEquivalentTime(
    xref:CBlockIndex.adoc[CBlockIndex] const& to,
    xref:CBlockIndex.adoc[CBlockIndex] const& from,
    xref:CBlockIndex.adoc[CBlockIndex] const& tip,
    xref:Consensus/Params.adoc[Consensus::Params] const& params);
----

== Return Value

The equivalent time in seconds&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *to*
| The block index entry to measure work up to&period;
| *from*
| The block index entry to measure work from&period;
| *tip*
| The block index entry whose difficulty sets the assumed hashrate&period;
| *params*
| The consensus parameters&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
