@@ -11,6 +11,7 @@ import (
1111 "os"
1212 "runtime"
1313 "sync"
14+ "time"
1415 "unsafe"
1516)
1617
@@ -332,17 +333,17 @@ type EnvInfo struct {
332333 * \details Overall statistics of page operations of all (running, completed
333334 * and aborted) transactions in the current multi-process session (since the
334335 * first process opened the database). */
335- PageOps EnfInfoPageOps
336- LastTxnID int64 // ID of the last committed transaction
337- MaxReaders uint // maximum number of threads for the environment
338- NumReaders uint // maximum number of threads used in the environment
339- PageSize uint //
340- SystemPageSize uint //
341- AutoSyncThreshold uint //
342- SinceSyncSeconds16dot16 uint //
343- AutosyncPeriodSeconds16dot16 uint //
344- SinceReaderCheckSeconds16dot16 uint //
345- Flags uint //
336+ PageOps EnfInfoPageOps
337+ LastTxnID int64 // ID of the last committed transaction
338+ MaxReaders uint // maximum number of threads for the environment
339+ NumReaders uint // maximum number of threads used in the environment
340+ PageSize uint //
341+ SystemPageSize uint //
342+ AutoSyncThreshold uint //
343+ SinceSync time. Duration //
344+ AutosyncPeriod time. Duration //
345+ SinceReaderCheck time. Duration //
346+ Flags uint //
346347}
347348
348349// Info returns information about the environment.
@@ -386,11 +387,11 @@ func (env *Env) Info() (*EnvInfo, error) {
386387 PageSize : uint (_info .mi_dxb_pagesize ),
387388 SystemPageSize : uint (_info .mi_sys_pagesize ),
388389
389- AutoSyncThreshold : uint (_info .mi_autosync_threshold ),
390- SinceSyncSeconds16dot16 : uint (_info .mi_since_sync_seconds16dot16 ),
391- AutosyncPeriodSeconds16dot16 : uint (_info .mi_autosync_period_seconds16dot16 ),
392- SinceReaderCheckSeconds16dot16 : uint (_info .mi_since_reader_check_seconds16dot16 ),
393- Flags : uint (_info .mi_mode ),
390+ AutoSyncThreshold : uint (_info .mi_autosync_threshold ),
391+ SinceSync : toDuration (_info .mi_since_sync_seconds16dot16 ),
392+ AutosyncPeriod : toDuration (_info .mi_autosync_period_seconds16dot16 ),
393+ SinceReaderCheck : toDuration (_info .mi_since_reader_check_seconds16dot16 ),
394+ Flags : uint (_info .mi_mode ),
394395 }
395396 return & info , nil
396397}
0 commit comments