using System.Runtime.InteropServices;
namespace NetVips;
///
/// Records a start time, and counts microseconds elapsed since that time.
///
[StructLayout(LayoutKind.Sequential)]
public struct GTimer
{
///
/// Monotonic start time, in microseconds.
///
public ulong Start;
///
/// Monotonic end time, in microseconds.
///
public ulong End;
///
/// Is the timer currently active?
///
[MarshalAs(UnmanagedType.I1)]
public bool Active;
}
///
/// Struct we keep a record of execution time in. Passed to eval signal so
/// it can assess progress.
///
[StructLayout(LayoutKind.Sequential)]
public struct VipsProgress
{
///
/// Image we are part of.
///
private nint Im;
///
/// Time we have been running.
///
public int Run;
///
/// Estimated seconds of computation left.
///
public int Eta;
///
/// Number of pels we expect to calculate.
///
public long TPels;
///
/// Number of pels calculated so far.
///
public long NPels;
///
/// Percent complete.
///
public int Percent;
///
/// Start time.
///
private nint StartPtr;
///
/// Start time.
///
public GTimer Start => Marshal.PtrToStructure(StartPtr);
}