mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	reddit plugin refactoring, performance improvemnts etc.
This commit is contained in:
		| @@ -99,6 +99,16 @@ function assertArguments() { | ||||
|     } | ||||
| } | ||||
|  | ||||
| async function stopWatch(what, func) { | ||||
|     const start = new Date(); | ||||
|  | ||||
|     await func(); | ||||
|  | ||||
|     const tookMs = new Date().getTime() - start.getTime(); | ||||
|  | ||||
|     console.log(`${what} took ${tookMs}ms`); | ||||
| } | ||||
|  | ||||
| module.exports = { | ||||
|     randomSecureToken, | ||||
|     randomString, | ||||
| @@ -119,5 +129,6 @@ module.exports = { | ||||
|     isEmptyOrWhitespace, | ||||
|     getDateTimeForFile, | ||||
|     sanitizeSql, | ||||
|     assertArguments | ||||
|     assertArguments, | ||||
|     stopWatch | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user