mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Mock getProcessCPUTime for WASM environments
This commit is contained in:
parent
39aed255bd
commit
32c34330a5
2 changed files with 10 additions and 1 deletions
9
metrics/cpu_js.go
Normal file
9
metrics/cpu_js.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// +build js,wasm
|
||||
|
||||
package metrics
|
||||
|
||||
// getProcessCPUTime is mocked for js/wasm environments. Currently it alwasy
|
||||
// returns 0.
|
||||
func getProcessCPUTime() int64 {
|
||||
return 0
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// +build !windows
|
||||
// +build !windows,!js
|
||||
|
||||
package metrics
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue