()
| 50 | }; |
| 51 | } |
| 52 | render() { |
| 53 | this.state.timeToMount === 0 && burnCPU(20); |
| 54 | return ( |
| 55 | <View style={styles.widgetContainer}> |
| 56 | <Text style={styles.widgetText}> |
| 57 | {`${this.state.timeToMount || '?'} ms`} |
| 58 | </Text> |
| 59 | </View> |
| 60 | ); |
| 61 | } |
| 62 | componentDidMount() { |
| 63 | const timeToMount = performanceNow() - this.state.ctorTimestamp; |
| 64 | this.setState({timeToMount}); |